Created
October 10, 2009 18:52
-
-
Save fizx/207041 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| if ARGV.length == 0 | |
| puts "Usage: #{$0} GEM_NAME [GEM_NAME ...]" | |
| exit 1 | |
| end | |
| ARGV.each do |name| | |
| File.open("/tmp/#{name}.gemspec", "w") do |file| | |
| file.puts <<-RUBY | |
| Gem::Specification.new do |s| | |
| s.name = %q{#{name}} | |
| s.version = "0.0.0" | |
| s.authors = ["Kyle Maxwell"] | |
| s.files = [] | |
| s.summary = %q{Placeholder for a gem to be migrated later} | |
| end | |
| RUBY | |
| end | |
| end | |
| Dir["/tmp/*.gemspec"].each do |spec| | |
| system "cd /tmp && gem build #{spec}" | |
| end | |
| Dir["/tmp/*.gem"].each do |gem| | |
| system "gem push #{gem}" | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment