Add script to automatically update version with a datestamp upon commit.

This commit is contained in:
Daniel Folkinshteyn 2010-08-20 11:08:31 -04:00
parent 2a40d6eb90
commit 05e8b658e6
2 changed files with 11 additions and 1 deletions

10
sandbox/version-commit Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
# Use this script to make commits. It will automatically update the version
# string to have a datetime stamp, prior to committing.
# All arguments get passed to git commit, so of course, use the -a option so that
# the version change gets added to the commit.
echo "Updating version..."
perl -pi -e "s/^version\s*=\s*['\"]([\S]+)[ '\"].*/version = '\1 ($( date -Iseconds ))'/" src/version.py
if [ "$?" -eq "0" ]; then
git commit $@
fi

View File

@ -1,3 +1,3 @@
"""stick the various versioning attributes in here, so we only have to change
them once."""
version = '0.83.4.1+gribble'
version = '0.83.4.1+gribble (2010-08-20T11:08:31-0400)'