projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
13200:fix python package version with latest git tag and timestamp
[arvados.git]
/
build
/
run-library.sh
diff --git
a/build/run-library.sh
b/build/run-library.sh
index ba946882ee49c2a3beb840d841732e87f28bffe3..9081c2238c54e546ca581e2cfef6e6d80e6a89f5 100755
(executable)
--- a/
build/run-library.sh
+++ b/
build/run-library.sh
@@
-1,4
+1,4
@@
-#!/bin/bash
+
#!/bin/bash
# Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0
# Copyright (C) The Arvados Authors. All rights reserved.
#
# SPDX-License-Identifier: AGPL-3.0
@@
-50,15
+50,16
@@
version_from_git() {
return
fi
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
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() {
}
nohash_version_from_git() {
@@
-75,7
+76,7
@@
timestamp_from_git() {
handle_python_package () {
# This function assumes the current working directory is the python package directory
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
# This package doesn't need rebuilding.
return
fi