-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathRakefile
More file actions
33 lines (27 loc) · 766 Bytes
/
Copy pathRakefile
File metadata and controls
33 lines (27 loc) · 766 Bytes
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
task :default => :check
desc 'Check syntax'
task :check do
puts "\n=== Validating ruby files Rakefile and Gemfile"
sh "ruby -c Rakefile"
sh "ruby -c Gemfile"
puts "\n=== Validating shell (*.sh) files"
Dir['**/*.sh'].each do |sh|
sh "bash -n #{sh}" unless sh =~ /^modules\//
end
end
desc 'Check that modules exist'
task :check_exists do
sh 'scripts/check_modules_exist.sh'
end
desc 'Install pre-commit hook'
task :precommit do
sh 'install -C -m 0755 hooks/pre-commit .git/hooks/pre-commit'
end
desc 'Install modules'
task :install do
sh 'rm -fr modules modules.tmp; rake check && librarian-puppet install --verbose --path=modules.tmp && mv modules.tmp modules'
end
desc 'Clean modules'
task :clean do
sh 'rm -fr modules modules.tmp'
end