Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit 146a916

Browse files
author
Yasser Elsayed
authored
Make rollback script understand new config_local format (#1396)
1 parent 7302c7b commit 146a916

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/release/rollback.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,11 @@
3232
PROJECT_ID="${PROJECT_ID:-cloud-datalab}"
3333

3434
gsutil cp gs://${PROJECT_ID}/deploy/config_local.js ./config_local.js
35-
REGEX='previous: ([0-9]+)'
35+
if [[ $(cat ./config_local.js | grep "PREV_SEMVER = ") ]]; then
36+
REGEX='PREV_SEMVER = "(.*)";'
37+
else
38+
REGEX='previous: ([0-9]+)'
39+
fi
3640
if [[ $(cat config_local.js) =~ $REGEX ]]; then
3741
OLD_BUILD=${BASH_REMATCH[1]}
3842
PREVIOUS_BUILD="${ROLLBACK_BUILD:-$OLD_BUILD}"

0 commit comments

Comments
 (0)