-#!/bin/bash
+ #!/bin/bash
# Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0
return
fi
- local git_ts git_hash prefix
+ ARVADOS_BUILDING_VERSION=`git describe --abbrev=0`
+ local git_ts
if [[ -n "$1" ]] ; then
prefix="$1"
else
prefix="0.1"
fi
- declare $(format_last_commit_here "git_ts=%ct git_hash=%h")
- echo "${prefix}.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).$git_hash"
+ declare $(format_last_commit_here "git_ts=%ct")
+ echo "$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
}
nohash_version_from_git() {
handle_python_package () {
# This function assumes the current working directory is the python package directory
- if [ -n "$(find dist -name "*-$(nohash_version_from_git).tar.gz" -print -quit)" ]; then
+ if [ -n "$(find dist -name "*-$ARVADOS_BUILDING_VERSION.$(date -ud "@$git_ts" +%Y%m%d%H%M%S).tar.gz" -print -quit)" ]; then
# This package doesn't need rebuilding.
return
fi