Skip to content

Commit

Permalink
Update promoteSites.sh (#954)
Browse files Browse the repository at this point in the history
  • Loading branch information
sravanlakkimsetti committed Mar 13, 2023
1 parent 7344df3 commit 589dc2b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cje-production/promotion/promoteSites.sh
Original file line number Diff line number Diff line change
Expand Up @@ -425,14 +425,14 @@ then
export BUILD_LABEL_EQ=$DROP_ID
export DROP_ID_EQ=$DROP_ID
else
PATTERN="^(S)-([[:digit:]]{1})\.([[:digit:]]{2})([[:alnum:]]{3})-([[:digit:]]{12})$"
PATTERN="^(S)-([[:digit:]]{1})\.([[:digit:]]{2})(.*)-([[:digit:]]{8})([[:digit:]]{4})$"
if [[ "${DROP_ID}" =~ $PATTERN ]]
then
export BUILD_TYPE=${BASH_REMATCH[1]}
export BUILD_TIMESTAMP=${BASH_REMATCH[5]}
export BUILD_TYPE=I
export BUILD_TIMESTAMP=${BASH_REMATCH[5]}${BASH_REMATCH[6]}
# Label and ID are the same, in this case
export BUILD_LABEL=$DROP_ID
export BUILD_LABEL_EQ=$DROP_ID
export BUILD_LABEL=${BASH_REMATCH[2]}.${BASH_REMATCH[3]}${BASH_REMATCH[4]}
export BUILD_LABEL_EQ=${BASH_REMATCH[2]}.${BASH_REMATCH[3]}${BASH_REMATCH[4]}
export DROP_ID_EQ=$DROP_ID
else
echo -e "\n\tERROR: DROP_ID, ${DROP_ID}, did not match any expected pattern."
Expand Down

0 comments on commit 589dc2b

Please sign in to comment.