Created
July 10, 2012 10:53
-
-
Save jlbfalcao/3082642 to your computer and use it in GitHub Desktop.
Getting x.y.z-release from a git-tag
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
data = %x{git log -n 1 --decorate --pretty=oneline}.match(/tag: (?<version>\d+\.\d+\.\d+)-(?<release>\w+)/) | |
data[:version] | |
data[:release] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment