Created
August 12, 2011 17:34
-
-
Save zathomas/1142524 to your computer and use it in GitHub Desktop.
This automates the process of creating a new tag based on today's date.
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
#!/bin/sh | |
version="1.0" | |
date=`date "+%Y%m%d"` | |
git checkout -b $version-$date-branch | |
sed "s/$version-SNAPSHOT/$version-$date/" pom.xml > pom.xml.new | |
mv pom.xml.new pom.xml | |
git add pom.xml | |
git ci -m "changing version number for tag" | |
git tag -m "tagging $version-$date" $version-$date HEAD | |
git push origin $version-$date |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It might be good to add a couple of lines to checkout back to whatever branch you were in when you started, and then delete the new date branch, which is a throwaway.