Limnoria/sandbox/update-version
Mika Suomalainen ab379957e2 sandbox/update-version: vim modelines exist.
Added vim modeline to enable syntax and set
filetype :)
2012-01-05 18:54:55 +02:00

9 lines
416 B
Bash
Executable File

#!/usr/bin/env bash
export TZ="/usr/share/zoneinfo/UTC" # Use UTC with version timestamps.
echo "Updating version..."
perl -pi -e "s/^version\s*=\s*['\"]([\S]+)[ '\"].*/version = '\1 ($( date -Iseconds ))'/" src/version.py
unset TZ # Return to the system timezone.
exec $SHELL # Execute the current shell to return to user timezone if specified in config of shell.
git add src/version.py
# vim: set ft=sh: syntax: