From e8e3fce851a201d29518a7840cb375cc700b62ff Mon Sep 17 00:00:00 2001 From: Markus Lehtonen Date: Tue, 15 Sep 2020 11:46:48 +0300 Subject: [PATCH] scripts: explicitly override VERSION in push-image.sh Without using -e to override variables from the environment. --- scripts/test-infra/push-image.sh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/test-infra/push-image.sh b/scripts/test-infra/push-image.sh index 41286bbe3..adefba64a 100755 --- a/scripts/test-infra/push-image.sh +++ b/scripts/test-infra/push-image.sh @@ -1,10 +1,9 @@ #!/bin/bash -e -# Strip 'vYYYYMMDD-' from the variable in order to get a reproducible -# version and container image tag -if [ -n "$_GIT_TAG" ]; then - export VERSION=${_GIT_TAG:10} -fi +# Override VERSION if _GIT_TAG is specified. Strip 10 first characters +# ('vYYYYMMDD-') from _GIT_TAG in order to get a reproducible version and +# container image tag +VERSION_OVERRIDE=${_GIT_TAG+VERSION=${_GIT_TAG:10}} -make image -e -make push -e +make image $VERSION_OVERRIDE +make push $VERSION_OVERRIDE