Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Main Repositories
otb
Commits
a2183af7
Commit
a2183af7
authored
May 07, 2021
by
Cédric Traizet
Browse files
BUG: use commit hash to determine the branch name
parent
ec242379
Pipeline
#7565
passed with stages
in 82 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Utilities/Maintenance/SuperbuildDownloadList.sh
View file @
a2183af7
...
...
@@ -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_*"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment