added pre-commit hook for auto version increment

This commit is contained in:
Rossen Georgiev 2014-11-30 00:03:51 +00:00
parent 98bac53fd7
commit 82b3ab7cfd
2 changed files with 13 additions and 1 deletions

View File

@ -1 +1 @@
__version__ = '0.6.2' __version__ = '0.6.3'

12
hooks/pre-commit Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
VERSTR="`git describe --long --tags --dirty --always`"
VER1="`echo $VERSTR | cut -d'-' -f1`"
VER2=$((`echo $VERSTR | cut -d'-' -f2` + 1))
VERSTR="__version__ = '${VER1}.${VER2}'"
echo "$VERSTR" > aprs/version.py
git add aprs/version.py