mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-18 08:02:49 +01:00
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:
parent
26e9671003
commit
a3f4fe3cb3
@ -1,4 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
export TZ="/usr/share/zoneinfo/UTC" # Use UTC with version timestamps.
|
||||||
echo "Updating version..."
|
echo "Updating version..."
|
||||||
perl -pi -e "s/^version\s*=\s*['\"]([\S]+)[ '\"].*/version = '\1 ($( date -Iseconds ))'/" src/version.py
|
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
|
git add src/version.py
|
||||||
|
Loading…
Reference in New Issue
Block a user