[ARVADOS] created: 1.3.0-1669-gb174ae5f4
Git user
git at public.curoverse.com
Tue Oct 1 17:46:23 UTC 2019
at b174ae5f406a0254e017a9428ca3d3deda177b97 (commit)
commit b174ae5f406a0254e017a9428ca3d3deda177b97
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Tue Oct 1 13:46:14 2019 -0400
15678: Fix version reporting.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/build/run-library.sh b/build/run-library.sh
index cb5549df7..ea839aa0d 100755
--- a/build/run-library.sh
+++ b/build/run-library.sh
@@ -164,7 +164,7 @@ package_go_binary() {
return 1
fi
- go get -ldflags "-X main.version=${go_package_version}" "git.curoverse.com/arvados.git/$src_path"
+ go get -ldflags "-X git.curoverse.com/arvados.git/lib/cmd.version=${go_package_version} -X main.version=${go_package_version}" "git.curoverse.com/arvados.git/$src_path"
local -a switches=()
systemd_unit="$WORKSPACE/${src_path}/${prog}.service"
diff --git a/build/run-tests.sh b/build/run-tests.sh
index 27228a374..766ff1b82 100755
--- a/build/run-tests.sh
+++ b/build/run-tests.sh
@@ -747,6 +747,11 @@ do_test() {
retry do_test_once ${@}
}
+go_ldflags() {
+ version=${ARVADOS_VERSION:-$(git log -n1 --format=%H)-dev}
+ echo "-X git.curoverse.com/arvados.git/lib/cmd.version=${version} -X main.version=${version}"
+}
+
do_test_once() {
unset result
@@ -766,7 +771,7 @@ do_test_once() {
# before trying "go test". Otherwise, coverage-reporting
# mode makes Go show the wrong line numbers when reporting
# compilation errors.
- go get -ldflags "-X git.curoverse.com/arvados.git/lib/cmd.version=${ARVADOS_VERSION:-$(git log -n1 --format=%H)-dev}" -t "git.curoverse.com/arvados.git/$1" && \
+ go get -ldflags "$(go_ldflags)" -t "git.curoverse.com/arvados.git/$1" && \
cd "$GOPATH/src/git.curoverse.com/arvados.git/$1" && \
if [[ -n "${testargs[$1]}" ]]
then
@@ -854,7 +859,7 @@ do_install_once() {
result=1
elif [[ "$2" == "go" ]]
then
- go get -ldflags "-X git.curoverse.com/arvados.git/lib/cmd.version=${ARVADOS_VERSION:-$(git log -n1 --format=%H)-dev}" -t "git.curoverse.com/arvados.git/$1"
+ go get -ldflags "$(go_ldflags)" -t "git.curoverse.com/arvados.git/$1"
elif [[ "$2" == "pip" ]]
then
# $3 can name a path directory for us to use, including trailing
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list