1
0
Fork 0
mirror of https://github.com/rubyjs/libv8 synced 2023-03-27 23:21:48 -04:00

Added small script to push a release from GitHub to rubygems

This commit is contained in:
Sam Saffron 2020-07-22 09:02:44 +10:00
parent 90ea31f215
commit 4cac62479a
No known key found for this signature in database
GPG key ID: B9606168D2FFD9F5

View file

@ -123,3 +123,38 @@ task :osx_varients do
end
end
end
desc 'Push a release from github'
task :push_github_release do
releases = (15..19).map do |i|
["-universal-darwin-#{i}", "-x86_64-darwin-#{i}"]
end.flatten
releases << ""
releases << "-x86_64-linux"
FileUtils.mkdir_p("pkg")
Dir.chdir("pkg") do
releases.each do |release|
cmd = "wget https://github.com/rubyjs/libv8/releases/download/v#{Libv8::VERSION}/libv8-#{Libv8::VERSION}#{release}.gem"
puts cmd
puts `#{cmd}`
end
otp = 111111
Dir["*#{Libv8::VERSION}*.gem"].each do |f|
puts "pushing #{f}"
begin
result = `gem push #{f} --otp #{otp}`
if result =~ /OTP code is incorrect/
puts "enter otp"
otp = STDIN.gets.strip
redo
end
end
puts result
end
end
end