1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00
rufus/_post-commit.sh
Pete Batard e4b7b9cfd6 [internal] update AppVeyor build script and add Coverity support
* Also only apply a git tag if on the master branch
2018-06-18 17:37:59 +01:00

19 lines
No EOL
534 B
Bash
Executable file

#!/bin/sh
#
# Creates a tag according to the number of commits on this branch
#
# To have git run this script on commit, create a "post-commit" text file in
# .git/hooks/ with the following content:
# #!/bin/sh
# if [ -x ./_post-commit.sh ]; then
# . ./_post-commit.sh
# fi
type -P git &>/dev/null || { echo "git command not found. Aborting." >&2; exit 1; }
TAGVER=`cat ./.tag`
# Only apply a tag if we're dealing with the master branch
if [ "`git rev-parse --abbrev-ref HEAD`" == "master" ]; then
git tag "b$TAGVER"
fi
rm ./.tag