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>
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
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