[ARVADOS] updated: 1.3.0-2619-g479b879e9
Git user
git at public.arvados.org
Tue Jun 2 14:41:58 UTC 2020
Summary of changes:
build/build-dev-docker-jobs-image.sh | 10 +---------
build/run-build-docker-jobs-image.sh | 10 +---------
build/run-library.sh | 17 ++++++++++++++---
3 files changed, 16 insertions(+), 21 deletions(-)
via 479b879e96bf60332b9a436e4ef4e5de517f028b (commit)
from ca3d1e44680d06398885e551ecf4bb601c0801b6 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 479b879e96bf60332b9a436e4ef4e5de517f028b
Author: Ward Vandewege <ward at jhvc.com>
Date: Tue Jun 2 10:05:44 2020 -0400
Some refactoring in the build scripts: move duplicated code to calculate
the cwl runner package version to a function. Remove unused argument to
the `version_from_git` function.
No issue #
Arvados-DCO-1.1-Signed-off-by: Ward Vandewege <ward at jhvc.com>
diff --git a/build/build-dev-docker-jobs-image.sh b/build/build-dev-docker-jobs-image.sh
index a3d439be6..7da808983 100755
--- a/build/build-dev-docker-jobs-image.sh
+++ b/build/build-dev-docker-jobs-image.sh
@@ -69,15 +69,7 @@ fi
. build/run-library.sh
-python_sdk_ts=$(cd sdk/python && timestamp_from_git)
-cwl_runner_ts=$(cd sdk/cwl && timestamp_from_git)
-
-python_sdk_version=$(cd sdk/python && nohash_version_from_git 0.1)
-cwl_runner_version=$(cd sdk/cwl && nohash_version_from_git 1.0)
-
-if [[ $python_sdk_ts -gt $cwl_runner_ts ]]; then
- cwl_runner_version=$(cd sdk/python && nohash_version_from_git 1.0)
-fi
+calculate_python_sdk_cwl_package_versions
set -x
docker build --no-cache --build-arg sdk=$sdk --build-arg runner=$runner --build-arg salad=$salad --build-arg cwltool=$cwltool --build-arg pythoncmd=$py --build-arg pipcmd=$pipcmd -f "$WORKSPACE/sdk/dev-jobs.dockerfile" -t arvados/jobs:$cwl_runner_version "$WORKSPACE/sdk"
diff --git a/build/run-build-docker-jobs-image.sh b/build/run-build-docker-jobs-image.sh
index 842975adb..ec8357701 100755
--- a/build/run-build-docker-jobs-image.sh
+++ b/build/run-build-docker-jobs-image.sh
@@ -139,15 +139,7 @@ if [[ -z "$ARVADOS_BUILDING_VERSION" ]] && ! [[ -z "$version_tag" ]]; then
ARVADOS_BUILDING_ITERATION="1"
fi
-python_sdk_ts=$(cd sdk/python && timestamp_from_git)
-cwl_runner_ts=$(cd sdk/cwl && timestamp_from_git)
-
-python_sdk_version=$(cd sdk/python && nohash_version_from_git 0.1)
-cwl_runner_version=$(cd sdk/cwl && nohash_version_from_git 1.0)
-
-if [[ $python_sdk_ts -gt $cwl_runner_ts ]]; then
- cwl_runner_version=$(cd sdk/python && nohash_version_from_git 1.0)
-fi
+calculate_python_sdk_cwl_package_versions
echo cwl_runner_version $cwl_runner_version python_sdk_version $python_sdk_version
diff --git a/build/run-library.sh b/build/run-library.sh
index 7dc293ab6..b75b6cca7 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -48,7 +48,6 @@ version_from_git() {
# Output the version being built, or if we're building a
# dev/prerelease, output a version number based on the git log for
# the given $subdir.
- local minorversion="$1"; shift # unused
local subdir="$1"; shift
if [[ -n "$ARVADOS_BUILDING_VERSION" ]]; then
echo "$ARVADOS_BUILDING_VERSION"
@@ -66,7 +65,7 @@ nohash_version_from_git() {
echo "$ARVADOS_BUILDING_VERSION"
return
fi
- version_from_git $1 | cut -d. -f1-4
+ version_from_git | cut -d. -f1-4
}
timestamp_from_git() {
@@ -74,6 +73,18 @@ timestamp_from_git() {
format_last_commit_here "%ct" "$subdir"
}
+calculate_python_sdk_cwl_package_versions() {
+ python_sdk_ts=$(cd sdk/python && timestamp_from_git)
+ cwl_runner_ts=$(cd sdk/cwl && timestamp_from_git)
+
+ python_sdk_version=$(cd sdk/python && nohash_version_from_git)
+ cwl_runner_version=$(cd sdk/cwl && nohash_version_from_git)
+
+ if [[ $python_sdk_ts -gt $cwl_runner_ts ]]; then
+ cwl_runner_version=$python_sdk_version
+ fi
+}
+
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
@@ -127,7 +138,7 @@ calculate_go_package_version() {
cd "$WORKSPACE"
ts="$(timestamp_from_git "$dir")"
if [[ "$ts" -gt "$timestamp" ]]; then
- version=$(version_from_git "" "$dir")
+ version=$(version_from_git "$dir")
timestamp="$ts"
fi
done
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list