@@ -29,14 +29,14 @@ log "Using remote '$remote'"
29
29
# Step 1: List all release branches and sort them by major/minor so we can find
30
30
# the latest release branch.
31
31
release_branches=$(
32
- git branch -r --format=' %(refname:short)' |
33
- grep -E" ${remote} /release/[0-9]+\.[0-9]+$" |
34
- sed" s|${remote} /||" |
35
- sort -V
32
+ git branch -r --format=' %(refname:short)' |
33
+ grep -E" ${remote} /release/[0-9]+\.[0-9]+$" |
34
+ sed" s|${remote} /||" |
35
+ sort -V
36
36
)
37
37
38
38
# As a sanity check, release/2.26 should exist.
39
- if ! echo " $release_branches " | grep" release/2.26" > /dev/null; then
39
+ if ! echo " $release_branches " | grep" release/2.26" > /dev/null; then
40
40
error" Could not find existing release branches. Did you run 'git fetch -ap${remote} '?"
41
41
fi
42
42
@@ -47,7 +47,7 @@ log "Latest release branch version: $latest_release_branch_version"
47
47
48
48
# Step 2: check if a matching tag `v<x.y>.0` exists. If it does not, we will
49
49
# use the release branch as the deploy branch.
50
- if ! git rev-parse" refs/tags/v${latest_release_branch_version} .0" > /dev/null2>&1 ; then
50
+ if ! git rev-parse" refs/tags/v${latest_release_branch_version} .0" > /dev/null2>&1 ; then
51
51
log" Tag 'v${latest_release_branch_version} .0' does not exist, using release branch as deploy branch"
52
52
deploy_branch=$latest_release_branch
53
53
else
@@ -58,7 +58,7 @@ log "Deploy branch: $deploy_branch"
58
58
# Finally, check if the current branch is the deploy branch.
59
59
log
60
60
if [[" $branch_name " != " $deploy_branch " ]]; then
61
- log" VERDICT: DO NOT DEPLOY"
62
- exit 1
61
+ log" VERDICT: DO NOT DEPLOY"
62
+ exit 1
63
63
fi
64
64
log" VERDICT: DEPLOY"