Skip to content
Snippets Groups Projects
Commit a2183af7 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

BUG: use commit hash to determine the branch name

parent ec242379
No related branches found
No related tags found
3 merge requests!820Release 7.3 (integration into develop),!819Release 7.3 (integration into master),!818Release 7.3 (integration into develop)
Pipeline #7565 passed
......@@ -39,13 +39,14 @@ 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/../../"
GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
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}
else
VERSION=$(git rev-parse --short HEAD)
VERSION=${GIT_HASH}
fi
CMAKE_FILES=$(find "${SB_CMAKE_DIR}" -maxdepth 1 -type f -name "External_*")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment