-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
39 lines (32 loc) · 966 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
34
35
36
37
38
39
require 'rubygems'
desc 'Publish IntAirActImageWindows'
task :publish => ['demo: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 :demo do
desc 'Publish IntAirActImageWindows'
task :publish do
publish('IntAirActImageWindows', 'intairact-image-windows')
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