2011-11-30 18:45:16 +00:00
|
|
|
#!/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
|
2011-12-09 22:47:44 +00:00
|
|
|
# if [ -x ./_post-commit.sh ]; then
|
2018-05-12 10:37:07 +00:00
|
|
|
# . ./_post-commit.sh
|
2011-12-09 22:47:44 +00:00
|
|
|
# fi
|
2011-11-30 18:45:16 +00:00
|
|
|
|
|
|
|
type -P git &>/dev/null || { echo "git command not found. Aborting." >&2; exit 1; }
|
|
|
|
|
2011-11-30 19:43:30 +00:00
|
|
|
TAGVER=`cat ./.tag`
|
2012-03-28 18:50:21 +00:00
|
|
|
git tag "b$TAGVER"
|
2011-11-30 19:43:30 +00:00
|
|
|
rm ./.tag
|