Created
October 15, 2012 22:38
-
-
Save jaimegago/3896119 to your computer and use it in GitHub Desktop.
one liner we use for release rpm tag
This file contains 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
git log -1 --pretty=format:"%ad %h" --date=short|sed s/'[[:space:]]'/."$(git log --oneline|wc -l)"git/|sed s/-//g | |
YYYYMMDD.$NUMBER_OF_COMMITS.git$COMMIT_HASH_SHORT | |
example output: 20121015.722git48b7147 | |
We use this to package our JAVA based snapshot as an extension of http://fedoraproject.org/wiki/Packaging:NamingGuidelines#Snapshot_packages . | |
Adding the number of commits before the "git" allows proper ordering of packages in yum database. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment