Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.

Commit b49d838

Browse files
committed
add task for pushing to rubygems
1 parent ba0ca2c commit b49d838

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tasks/gems.rb

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,20 @@
3131
end
3232
end
3333
end
34+
35+
desc "upload all hyperloop gems to rubygems"
36+
task :push do
37+
HYPERLOOP_REPOS.each do |repo|
38+
Dir.chdir(File.join('..', repo)) do
39+
best_time = Time.new(1970, 1, 1)
40+
last_created_gem_fst = Dir.glob('*.gem').reduce([best_time, '']) do |gem_fst, gem|
41+
mtime = File.stat(gem).mtime
42+
mtime > gem_fst[0] ? [mtime, gem] : gem_fst
43+
end
44+
puts "pushing #{last_created_gem_fst[1]}"
45+
`gem push #{last_created_gem_fst[1]}`
46+
end
47+
end
48+
end
3449
end
3550
end

0 commit comments

Comments
 (0)