Skip to content

Commit

Permalink
Display advice to use mri to push gem to rubygems if running release …
Browse files Browse the repository at this point in the history
…on jruby
  • Loading branch information
leemhenson committed Oct 6, 2011
1 parent c7f1734 commit 3068415
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 3068415

Please sign in to comment.