diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tasks/gems.rake | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/tasks/gems.rake b/lib/tasks/gems.rake index e185d1b..cfeca1f 100644 --- a/lib/tasks/gems.rake +++ b/lib/tasks/gems.rake @@ -1,7 +1,8 @@ +require File.expand_path('../../../lib/leap_web/version', __FILE__) + 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 @@ -19,13 +20,13 @@ namespace :gem do engines.each do |gem_name| puts "########################### #{gem_name} #########################" - cmd = "rm #{gem_name}/pkg"; puts cmd; system cmd + cmd = "rm -rf #{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 + cmd = "cd #{gem_name}/pkg && gem install leap_web_#{gem_name}-#{LeapWeb::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 + cmd = "gem install pkg/leap_web-#{LeapWeb::VERSION}.gem"; puts cmd; system cmd end desc "Release all gems to gemcutter. Package leap web components, then push" @@ -33,8 +34,8 @@ namespace :gem 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 + cmd = "cd #{gem_name}/pkg && gem push leap_web_#{gem_name}-#{LeapWeb::VERSION}.gem"; puts cmd; system cmd end - cmd = "gem push pkg/leap_web-#{version}.gem"; puts cmd; system cmd + cmd = "gem push pkg/leap_web-#{LeapWeb::VERSION}.gem"; puts cmd; system cmd end end |