Created
March 17, 2015 07:10
-
-
Save sonsongithub/32aa13cfa382f97da94b to your computer and use it in GitHub Desktop.
post-commit script for 2tch
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
#!/bin/bash | |
GIT_MARKETING_VERSION=`git describe --abbrev=0 --tags` | |
GIT_REVISION=`git rev-parse --short HEAD` | |
GIT_COMMIT_TIMES_STRING=`git log --since=2000-01-01 --oneline --no-merges | wc -l` | |
let GIT_COMMIT_TIMES=GIT_COMMIT_TIMES_STRING+13000 | |
cat > ./2tch/info.prefix <<EOT | |
#define GIT_MARKETING_VERSION ${GIT_MARKETING_VERSION} | |
#define GIT_REVISION ${GIT_REVISION} | |
#define GIT_COMMIT_TIMES ${GIT_COMMIT_TIMES} | |
EOT | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment