mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Revert "[ruby/stringio] Add push task to push built gems"
This reverts commit 22f79ae3f7
.
This commit is contained in:
parent
8a3663789c
commit
24d7ebfa7a
1 changed files with 0 additions and 30 deletions
|
@ -1,30 +0,0 @@
|
|||
release_task = Rake.application["release"]
|
||||
release_task.prerequisites.delete("build")
|
||||
release_task.prerequisites.delete("release:rubygem_push")
|
||||
release_task_comment = release_task.comment
|
||||
if release_task_comment
|
||||
release_task.clear_comments
|
||||
release_task.comment = release_task_comment.gsub(/ and build.*$/, "")
|
||||
end
|
||||
|
||||
desc "Push built gems"
|
||||
task "push" do
|
||||
require "open-uri"
|
||||
helper = Bundler::GemHelper.instance
|
||||
gemspec = helper.gemspec
|
||||
name = gemspec.name
|
||||
version = gemspec.version.to_s
|
||||
pkg_dir = "pkg"
|
||||
mkdir_p(pkg_dir)
|
||||
["", "-java"].each do |type|
|
||||
base_url = "https://github.com/ruby/#{name}/releases/download"
|
||||
url = URI("#{base_url}/v#{version}/#{name}-#{version}#{type}.gem")
|
||||
path = "#{pkg_dir}/#{File.basename(url.path)}"
|
||||
url.open do |input|
|
||||
File.open(path, "wb") do |output|
|
||||
IO.copy_stream(input, output)
|
||||
end
|
||||
helper.__send__(:rubygem_push, path)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue