forked from finscn/avoscloud-doc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
32 lines (28 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
def exec(cmd)
puts cmd
system cmd
end
task :check_ruby_version do |t|
raise "Ruby < 1.9" if RUBY_VERSION.include? "1.8"
end
task :render => [:check_ruby_version] do |t|
exec 'ruby render.rb'
end
task :deploy, [:type] => [] do |t, args|
case args[:type]
when "us-w1"
when "cn-n1"
when "cn-e1"
exec "fab -H ubuntu@cn-e1-web1,ubuntu@cn-e1-web2,ubuntu@cn-e1-web3 deploy_docs"
when "beta"
exec "fab -H [email protected] deploy_docs"
when "cn_stg"
exec "fab -H [email protected] deploy_docs"
end
end
task :install do |t|
# exec "gem list | grep -E 'hpricot.*0\.8\.6' > /dev/null || sudo gem install hpricot"
# exec "npm list -g | grep -E 'doctoc@0\.4\.4' > /dev/null || sudo npm install -g [email protected]"
end