Commit dfab6a73 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

REFAC: move SuperbuildDownloadList.sh to the CI dir and use CI variable to...

REFAC: move SuperbuildDownloadList.sh to the CI dir and use CI variable to determine the branch name
parent a2183af7
Pipeline #7585 failed with stages
in 111 minutes and 20 seconds
......@@ -431,7 +431,7 @@ update-archive:
- git lfs fetch origin $CI_COMMIT_SHA
- git checkout -f -q $CI_COMMIT_SHA
script:
- ./Utilities/Maintenance/SuperbuildDownloadList.sh download build_archive
- ./CI/SuperbuildDownloadList.sh download build_archive
- ./CI/deploy-archive.sh build_archive
needs:
# don't push the archive if Superbuild was not successful
......
......@@ -35,17 +35,17 @@ WGET=$(which wget)
CUR_DIR="$( cd "$( dirname "$0" )" && pwd )"
SB_CMAKE_DIR_REL=$CUR_DIR/../../SuperBuild/CMake
SB_CMAKE_DIR_REL=$CUR_DIR/../SuperBuild/CMake
SB_CMAKE_DIR=$(readlink -f "${SB_CMAKE_DIR_REL}")
cd "$CUR_DIR/../../" || echo "cannot cd to CUR_DIR/../../"
cd "$CUR_DIR/../" || echo "cannot cd to CUR_DIR/../"
GIT_HASH=$(git rev-parse --short HEAD)
GIT_BRANCH=$(git name-rev --name-only ${GIT_HASH})
# the version is the branch name for develop and release-X.Y branches and the commit short hash for other branches
if [[ ${GIT_BRANCH} =~ develop|release-+[0-9]+\.[0-9] ]] ; then
VERSION=${GIT_BRANCH}
if [[ ${CI_COMMIT_REF_NAME} =~ develop|release-+[0-9]+\.[0-9] ]] ; then
VERSION=${CI_COMMIT_REF_NAME}
else
GIT_HASH=$(git rev-parse --short HEAD)
VERSION=${GIT_HASH}
fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment