Skip to content

Instantly share code, notes, and snippets.

@atd
Created September 19, 2011 07:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atd/1226109 to your computer and use it in GitHub Desktop.
Save atd/1226109 to your computer and use it in GitHub Desktop.
# Quick script used to import social_stream-* tags to social_stream's repository
Dir["*tags"].inject({}) { |res, f|
res[f[0..-6]] = File.read(f).split("\n")
res
}.each_pair{ |repo, tags|
tags.each { |tag|
commit = `cd ../social_stream-#{ repo } && git show #{ tag }`.split("\n").
select{ |l| l =~ /^commit/ }.
first.
gsub("commit ", "")
system "git tag #{ repo }#{ tag[1..-1] } #{ commit }"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment