mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-17 23:52:46 +01:00
a3f4fe3cb3
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.
8 lines
388 B
Bash
Executable File
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
|