Tagging in Git with Ruby
#!/usr/bin/env ruby
puts 'Tag version?'
tag = gets.chomp
tag = "v#{tag}" unless tag[0] == 'v'
`git commit -m 'Bump version "#{tag}"'`
`git push origin master`
`git co stable`
`git pull origin stable`
`git merge master`
`git tag "#{tag}"`
`git push origin stable`
`git push --tags`
`git co master`
Written by Romain Laurent
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#