From 8f68f53b675265cbc4acfab29ec7968bf68d405c Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Fri, 20 May 2022 18:21:03 +0000 Subject: [PATCH] build: fix unbound variable error in build artifact script (#46076) We recently had a couple of issues with the shallowing of snapshot git repositories. In an attempt to fix this, parts of the publish script of the COMP repo have been used, but variables have not been updated properly. This commit fixes an unbound variable, avoiding errors when snapshots are published for a new branch (e.g. when we branch-off). PR Close #46076 --- scripts/ci/publish-build-artifacts.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/ci/publish-build-artifacts.sh b/scripts/ci/publish-build-artifacts.sh index 58f7b0d9b7b..87d88f87393 100755 --- a/scripts/ci/publish-build-artifacts.sh +++ b/scripts/ci/publish-build-artifacts.sh @@ -48,7 +48,7 @@ function publishRepo { mkdir -p ${REPO_DIR} echo "Starting cloning process of ${REPO_URL} into ${REPO_DIR}.." - + ( if [[ $(git ls-remote --heads ${REPO_URL} ${BRANCH}) ]]; then echo "Branch ${BRANCH} already exists. Cloning that branch." @@ -57,7 +57,7 @@ function publishRepo { cd ${REPO_DIR} echo "Cloned repository and switched into the repository directory (${REPO_DIR})." else - echo "Branch ${BRANCH} does not exist on ${packageRepo} yet." + echo "Branch ${BRANCH} does not exist on ${BUILD_REPO} yet." echo "Cloning default branch and creating branch '${BRANCH}' on top of it." git clone ${REPO_URL} ${REPO_DIR} --depth 1