diff options
author | Azul <azul@leap.se> | 2012-10-08 10:46:04 +0200 |
---|---|---|
committer | Azul <azul@leap.se> | 2012-10-08 10:46:04 +0200 |
commit | 7eb16bf58d4a2cc7e7fae2b9ffe015de8ee199e8 (patch) | |
tree | 00b5ae6ab5872f12ff5183a73845c35d06d27ceb /lib/tasks/gems.rake | |
parent | efcf0e5927055d2b86804c84b00c614b38191964 (diff) |
rake tasks for building all gems in one go
Diffstat (limited to 'lib/tasks/gems.rake')
-rw-r--r-- | lib/tasks/gems.rake | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lib/tasks/gems.rake b/lib/tasks/gems.rake new file mode 100644 index 0000000..e185d1b --- /dev/null +++ b/lib/tasks/gems.rake @@ -0,0 +1,40 @@ +namespace :gem do + + engines = %w(core users certs help) + version = File.read(File.expand_path("../../../version", __FILE__)).strip + + desc "run rake gem for all gems" + task :build do + engines.each do |gem_name| + puts "########################### #{gem_name} #########################" + cmd = "rm -rf #{gem_name}/pkg"; puts cmd; system cmd + cmd = "cd #{gem_name} && bundle exec rake gem"; puts cmd; system cmd + end + cmd = "rm -rf pkg"; puts cmd; system cmd + cmd = "bundle exec rake gem"; puts cmd; system cmd + end + + desc "run gem install for all gems" + task :install do + + engines.each do |gem_name| + puts "########################### #{gem_name} #########################" + cmd = "rm #{gem_name}/pkg"; puts cmd; system cmd + cmd = "cd #{gem_name} && bundle exec rake gem"; puts cmd; system cmd + cmd = "cd #{gem_name}/pkg && gem install leap_web_#{gem_name}-#{version}.gem"; puts cmd; system cmd + end + cmd = "rm -rf pkg"; puts cmd; system cmd + cmd = "bundle exec rake gem"; puts cmd; system cmd + cmd = "gem install pkg/leap_web-#{version}.gem"; puts cmd; system cmd + end + + desc "Release all gems to gemcutter. Package leap web components, then push" + task :release do + + engines.each do |gem_name| + puts "########################### #{gem_name} #########################" + cmd = "cd #{gem_name}/pkg && gem push leap_web_#{gem_name}-#{version}.gem"; puts cmd; system cmd + end + cmd = "gem push pkg/leap_web-#{version}.gem"; puts cmd; system cmd + end +end |