update-version: Use UTC with version timestamps.

If we don't use same timezone, we can get funny times,
because we are on different timezones.

For example, I could commit something at 16:00, then
ProgVal/nyuszika7h/skizzhg/Banton could commit some-
thing and timestamp would only show that it happened
at the same time on different timezone.

Timestamps using specific timezone could also make
reading of version numbers easier.
This commit is contained in:
Mika Suomalainen 2012-01-05 15:44:14 +02:00
parent 26e9671003
commit a3f4fe3cb3

View File

@ -1,4 +1,7 @@
#!/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 use timezone if specified in config of shell.
git add src/version.py