Skip to content

Commit

Permalink
Extend validation
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
  • Loading branch information
dennis-behm committed Mar 1, 2024
1 parent 0df2814 commit c2ff8f2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Templates/Common-Backend-Scripts/utilities/dbbBuildUtils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,20 @@ computeBuildConfiguration() {

getBaselineReference() {

baselienRef=""
baselineRef=""

case $mainBranchSegment in
"RELEASE" | "release" | "EPIC" | "epic")
case $(echo $mainBranchSegment | tr '[:lower:]' '[:upper:]') in
"RELEASE" | "EPIC")
baselineRef=$(cat "${baselineReferenceFile}" | grep "^${mainBranchSegment}/${secondBranchSegment}" | awk -F "=" ' { print $2 }')
;;
"main" | "MAIN")
"MAIN")
baselineRef=$(cat "${baselineReferenceFile}" | grep "^${mainBranchSegment}" | awk -F "=" ' { print $2 }')
;;
*)
rc=8
ERRMSG=$PGM": [ERROR] Branch name ${Branch} does not follow the recommended naming conventions to compute the baseline reference. Received '${mainBranchSegment}' which does not fall into the conventions of release, epic or main. rc="$rc
echo $ERRMSG
;;
esac


Expand Down

0 comments on commit c2ff8f2

Please sign in to comment.