-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
33 lines (30 loc) · 955 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
desc "Package the project for deploying to WordPress.org"
task :package do
cmds = [
'cp -R ./ ../the-city-chipin',
'cd ../',
'rm -rf ./the-city-chipin/.git',
'rm -f ./the-city-chipin/README.rdoc',
'rm -f ./the-city-chipin/changelog',
'rm -f ./the-city-chipin/Rakefile',
'rm -f ./the-city-chipin/notes.txt',
'zip -r the-city-chipin.zip ./the-city-chipin',
'rm -rf the-city-chipin'
]
`#{cmds.join(' ; ')}`
end
desc "Copy files that would go in the package [for deploying to WordPress.org] to a path"
task :package_to_path, :path do |t, args|
cmds = [
'cp -R ./ ../the-city-chipin',
'cd ../',
'rm -rf ./the-city-chipin/.git',
'rm -f ./the-city-chipin/README.rdoc',
'rm -f ./the-city-chipin/changelog',
'rm -f ./the-city-chipin/Rakefile',
'rm -f ./the-city-chipin/notes.txt',
"cp -R ./the-city-chipin/* #{args[:path]}",
'rm -rf the-city-chipin'
]
`#{cmds.join(' ; ')}`
end