version-at-commit.sh uses '.dev' instead of '.pre'
authorPeter Amstutz <peter.amstutz@curii.com>
Thu, 16 Jan 2020 15:40:08 +0000 (10:40 -0500)
committerPeter Amstutz <peter.amstutz@curii.com>
Thu, 16 Jan 2020 15:40:08 +0000 (10:40 -0500)
Makes Python happy -- setuptools allows '.dev' in the version, but
normalizes '.pre' into '.rc' which actually changes the package
filename.

Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

build/version-at-commit.sh

index 3a52c4b2043b7cd02c27cadd36d28a2066ac7c0f..6ed34244a139247dd1409b7fcab114a621d24c02 100755 (executable)
@@ -3,6 +3,7 @@
 set -e -o pipefail
 commit="$1"
 versionglob="[0-9].[0-9]*.[0-9]*"
+devsuffix=".dev"
 
 if ! git describe --exact-match --match "$versionglob" "$commit" 2>/dev/null; then
     if git merge-base --is-ancestor "$commit" origin/master; then
@@ -14,5 +15,5 @@ if ! git describe --exact-match --match "$versionglob" "$commit" 2>/dev/null; th
     fi
     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"
+    echo "${v}${devsuffix}${ts}"
 fi