Commit b8b389267e75c064503cfe772831b68444b413b0
1 parent
69faa492
Exists in
master
and in
31 other branches
check dependencies; requires chake >= 0.10
Showing
2 changed files
with
15 additions
and
3 deletions
Show diff stats
Rakefile
... | ... | @@ -49,8 +49,8 @@ end |
49 | 49 | |
50 | 50 | require 'chake' |
51 | 51 | |
52 | -if Gem::Version.new(Chake::VERSION) < Gem::Version.new('0.7') | |
53 | - fail "Please upgrade to chake 0.7+" | |
52 | +if Gem::Version.new(Chake::VERSION) < Gem::Version.new('0.10') | |
53 | + fail "Please upgrade to chake 0.10+" | |
54 | 54 | end |
55 | 55 | |
56 | 56 | ips ||= YAML.load_file(ips_file) |
... | ... | @@ -137,7 +137,7 @@ namespace :export_data do |
137 | 137 | end |
138 | 138 | end |
139 | 139 | |
140 | -task :bootstrap_common => 'config/local/ssh_config' | |
140 | +task :bootstrap_common => :check_dependencies | |
141 | 141 | |
142 | 142 | unless ENV['nodeps'] |
143 | 143 | task 'converge:integration' => 'converge:database' | ... | ... |
... | ... | @@ -0,0 +1,12 @@ |
1 | +task :check_dependencies do | |
2 | + missing = [ | |
3 | + { program: 'sphinx-build', package: 'python-sphinx' }, | |
4 | + { program: 'make', package: 'make' }, | |
5 | + ].select do |dependency| | |
6 | + !system("which #{dependency[:program]} >/dev/null") | |
7 | + end | |
8 | + missing.each do |dependency| | |
9 | + puts "Please install package #{dependency[:package]}" | |
10 | + end | |
11 | + fail 'E: missing dependencies' if missing.size > 0 | |
12 | +end | ... | ... |