[ARVADOS] updated: 2.1.0-1556-ge23098283
Git user
git at public.arvados.org
Thu Oct 28 18:57:23 UTC 2021
Summary of changes:
sdk/java-v2/test-in-docker.sh | 33 +++++----------------------------
1 file changed, 5 insertions(+), 28 deletions(-)
via e230982830132e278122f873d5f7434a63533362 (commit)
from 8392d11d7b9db3006831eb2314c2c5d0b9eb8459 (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 e230982830132e278122f873d5f7434a63533362
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Thu Oct 28 14:57:04 2021 -0400
18273: simplify and use version-at-commit.sh
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/sdk/java-v2/test-in-docker.sh b/sdk/java-v2/test-in-docker.sh
index e811cb248..7af3d32c4 100755
--- a/sdk/java-v2/test-in-docker.sh
+++ b/sdk/java-v2/test-in-docker.sh
@@ -6,12 +6,11 @@
#
set -e
-format_last_commit_here() {
- local format="$1"; shift
- TZ=UTC git log -n1 --first-parent "--format=format:$format" .
+commit_at_dir() {
+ git log -n1 --format=%H .
}
-version_from_git() {
+build_version() {
# Output the version being built, or if we're building a
# dev/prerelease, output a version number based on the git log for
# the current working directory.
@@ -20,29 +19,7 @@ version_from_git() {
return
fi
- local git_ts git_hash prefix
- if [[ -n "$1" ]] ; then
- prefix="$1"
- else
- prefix="0.1"
- fi
-
- declare $(format_last_commit_here "git_ts=%ct git_hash=%h")
- ARVADOS_BUILDING_VERSION="$(git describe --abbrev=0).$(date -ud "@$git_ts" +%Y%m%d%H%M%S)"
- echo "$ARVADOS_BUILDING_VERSION"
+ $WORKSPACE/build/version-at-commit.sh $(commit_at_dir)
}
-nohash_version_from_git() {
- version_from_git $1 | cut -d. -f1-3
-}
-
-timestamp_from_git() {
- format_last_commit_here "%ct"
-}
-if [[ -n "$1" ]]; then
- build_version="$1"
-else
- build_version="$(version_from_git)"
-fi
-#UID=$(id -u) # UID is read-only on many systems
-exec docker run --rm --user $UID -v $PWD:$PWD -w $PWD gradle:5.3.1 /bin/sh -c 'gradle clean && gradle test && gradle jar install '"$gradle_upload"
+exec docker run --rm --user $UID -v $PWD:$PWD -w $PWD gradle:5.3.1 /bin/sh -c 'gradle clean && gradle test && gradle jar install '"-Pversion=$(build_version) $gradle_upload"
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list