Merge pull request #306 from Mkaysi/update-version

sandbox/update-version: Use "/usr/bin/env bash" instead of "/bin/bash" && Use UTC as timezone.
This commit is contained in:
Valentin Lorentz 2012-01-05 10:51:58 -08:00
commit f6374ed88e

View File

@ -1,4 +1,8 @@
#!/bin/bash #!/usr/bin/env bash
export TZ="/usr/share/zoneinfo/UTC" # Set timezone as UTC for version timestamps to be in UTC.
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 user timezone if specified in config of shell.
git add src/version.py git add src/version.py
# vim: set ft=sh: syntax: