Created
November 7, 2014 11:20
-
-
Save OndrejP/9401f9fdd50413447e0c to your computer and use it in GitHub Desktop.
Short way to create release 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
function git.releaseID { | |
test $(date --reference=${HOME}/.git.releaseid +"%j" 2>/dev/null || echo 389) -ne $(date +"%j") \ | |
&& echo -n 1 >~/.git.releaseid \ | |
|| echo $(($(cat ~/.git.releaseid)+1)) >~/.git.releaseid ; | |
cat ~/.git.releaseid ; | |
} | |
function WikidiRelease { | |
r=$(date +"%Y%m%d").$(git.releaseID); | |
git tag release/$r; | |
git push origin release/$r; | |
} |
pracj3am
commented
Nov 7, 2014
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment