summaryrefslogtreecommitdiff
path: root/lib/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tasks')
-rw-r--r--lib/tasks/gems.rake40
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