-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
57 lines (50 loc) · 1.95 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
desc "Package the project for deploying to WordPress.org"
task :package do
cmds = [
'cp -R ./ ../the-city-plaza',
'cd ../',
'rm -rf ./the-city-plaza/.git',
'rm -rf ./the-city-plaza/.gitmodules',
'rm -f ./the-city-plaza/README.rdoc',
'rm -f ./the-city-plaza/changelog',
'rm -f ./the-city-plaza/Rakefile',
'rm -f ./the-city-plaza/notes.txt',
'rm -rf ./the-city-plaza/lib/plaza-php/.git',
'rm -f ./the-city-plaza/lib/plaza-php/.gitignore',
'rm -rf ./the-city-plaza/lib/plaza-php/storage',
'rm -rf ./the-city-plaza/lib/plaza-php/test',
'rm -rf ./the-city-plaza/lib/plaza-php/build_docs',
'rm -rf ./the-city-plaza/lib/plaza-php/etc',
'rm -rf ./the-city-plaza/lib/plaza-php/storage/*',
'rm -rf ./the-city-plaza/lib/plaza-php/lib/tutorials',
'rm -f ./the-city-plaza/lib/plaza-php/README.rdoc',
'zip -r the-city-plaza.zip ./the-city-plaza',
'rm -rf the-city-plaza'
]
`#{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-plaza',
'cd ../',
'rm -rf ./the-city-plaza/.git',
'rm -rf ./the-city-plaza/.gitmodules',
'rm -f ./the-city-plaza/README.rdoc',
'rm -f ./the-city-plaza/changelog',
'rm -f ./the-city-plaza/Rakefile',
'rm -f ./the-city-plaza/notes.txt',
'rm -rf ./the-city-plaza/lib/plaza-php/.git',
'rm -f ./the-city-plaza/lib/plaza-php/.gitignore',
'rm -rf ./the-city-plaza/lib/plaza-php/storage',
'rm -rf ./the-city-plaza/lib/plaza-php/test',
'rm -rf ./the-city-plaza/lib/plaza-php/build_docs',
'rm -rf ./the-city-plaza/lib/plaza-php/etc',
'rm -rf ./the-city-plaza/lib/plaza-php/storage/*',
'rm -rf ./the-city-plaza/lib/plaza-php/lib/tutorials',
'rm -f ./the-city-plaza/lib/plaza-php/README.rdoc',
"cp -R ./the-city-plaza/* #{args[:path]}",
'rm -rf the-city-plaza'
]
`#{cmds.join(' ; ')}`
end