From: Tom Clegg Date: Fri, 3 Jan 2020 20:24:08 +0000 (-0500) Subject: Update version number script to work with git 2.1.4. X-Git-Tag: 1.4.3~2 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/311443795cf368f62c984838d2ed385f6a95694c Update version number script to work with git 2.1.4. Arvados-DCO-1.1-Signed-off-by: Tom Clegg --- diff --git a/build/version-at-commit.sh b/build/version-at-commit.sh index 2f514c82da..3a52c4b204 100755 --- a/build/version-at-commit.sh +++ b/build/version-at-commit.sh @@ -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