Last Updated: February 25, 2016
·
752
· caedes

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`

Source: https://gist.github.com/d19c6bb1d0336db251bf