Update version number script to work with git 2.1.4.
authorTom Clegg <tom@tomclegg.ca>
Fri, 3 Jan 2020 20:24:08 +0000 (15:24 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Wed, 15 Jan 2020 14:19:40 +0000 (09:19 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom@tomclegg.ca>

build/version-at-commit.sh

index 2f514c82da0cf7f58d1f08a5b9a26a2c1e3c1f5e..3a52c4b2043b7cd02c27cadd36d28a2066ac7c0f 100755 (executable)
@@ -12,6 +12,7 @@ if ! git describe --exact-match --match "$versionglob" "$commit" 2>/dev/null; th
         # x.y.(z+1).preTIMESTAMP, where x.y.z is the latest released ancestor of $commit
         v=$(git describe --abbrev=0 --match "$versionglob" "$commit" | perl -pe 's/(\d+)$/$1+1/e')
     fi
-    ts=$(TZ=UTC git log -n1 --format=%cd --date="format-local:%Y%m%d%H%M%S" "$commit")
+    isodate=$(TZ=UTC git log -n1 --format=%cd --date=iso "$commit")
+    ts=$(TZ=UTC date --date="$isodate" "+%Y%m%d%H%M%S")
     echo "$v.pre$ts"
 fi