Permalink
Browse files

Display advice to use mri to push gem to rubygems if running release …

…on jruby
  • Loading branch information...
1 parent c7f1734 commit 3068415874bf557fdcd1ea4dd8ccfb70a29850f1 @leemhenson leemhenson committed Oct 6, 2011
Showing with 14 additions and 1 deletion.
  1. +14 −1 Rakefile
View
@@ -36,6 +36,10 @@ def replace_header(head, header_name)
head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
end
+def jruby?
+ RUBY_PLATFORM.to_s == 'java'
+end
+
#############################################################################
#
# Custom tasks
@@ -65,7 +69,16 @@ task :release => :build do
sh "git tag v#{version}"
sh "git push origin master"
sh "git push origin v#{version}"
- sh "gem push pkg/#{name}-#{version}.gem"
+
+ command = "gem push pkg/#{name}-#{version}.gem"
+
+ if jruby?
+ puts "--------------------------------------------------------------------------------------"
+ puts "can't push to rubygems using jruby at the moment, so switch to mri and run: #{command}"
+ puts "--------------------------------------------------------------------------------------"
+ else
+ sh command
+ end
end
desc "Build #{gem_file} into the pkg directory"

0 comments on commit 3068415

Please sign in to comment.