forked from mytestbed/omf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
24 lines (21 loc) · 793 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
PROJECTS = %w(omf_common omf_rc omf_ec)
errors = []
desc "Run test task for all projects by default"
task :default => :test
desc "Run test task for all projects"
task :test do
PROJECTS.each do |project|
system("cd #{project} && bundle && bundle update") || errors << project
system("cd #{project} && #{$0} install") || errors << project
system("cd #{project} && #{$0} test") || errors << project
end
fail("Errors in #{errors.join(', ')}") unless errors.empty?
end
desc "Release gems for all projects (Run rake test first)"
task :release do
version = `git describe --tags`.chomp
PROJECTS.each do |project|
system("cd #{project} && gem push pkg/#{project}-#{version}.gem") || errors << project
end
fail("Errors in #{errors.join(', ')}") unless errors.empty?
end