Limnoria/sandbox/update-version
Mika Suomalainen a3f4fe3cb3 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.
2012-01-05 15:44:14 +02:00

8 lines
388 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 use timezone if specified in config of shell.
git add src/version.py