-
Notifications
You must be signed in to change notification settings - Fork 3
/
Rakefile
48 lines (38 loc) · 1.11 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
require 'rubygems'
desc 'Publish Bonjour Browser and Bonjour Publisher'
task :publish => ['browser:publish', 'publisher:publish']
def publish(name, folder)
cd name do
rm_rf 'ase-lab.github.com'
system('git clone https://github.com/ase-lab/ase-lab.github.com.git')
cd 'ase-lab.github.com' do
system('git rm -r ' + folder)
mv('../publish', folder)
system('git add ' + folder)
system('git commit -m "Updated ' + name + '"')
system('git push')
end
rm_rf 'ase-lab.github.com'
end
end
namespace :browser do
desc 'Publish Bonjour Browser'
task :publish do
publish('Bonjour Browser', 'bonjour-browser')
end
end
namespace :publisher do
desc 'Publish Bonjour Publisher'
task :publish do
publish('Bonjour Publisher', 'bonjour-publisher')
end
end
desc 'Initialize and update all submodules recursively'
task :init do
system('git submodule update --init --recursive')
system('git submodule foreach --recursive "git checkout master"')
end
desc 'Pull all submodules recursively'
task :pull => :init do
system('git submodule foreach --recursive git pull')
end