Skip to content

Commit 4c6d4e9

Browse files
committed
Correcting bash comparison, and sorting and tailing the branches so we get the right one
1 parent b197917 commit 4c6d4e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/release-cut-tag.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ jobs:
2323
GH_TOKEN: ${{ github.token }}
2424
run: |
2525
#Translate 'develop' to 18.x or whatever is appropriate
26-
if [ "develop" == "${{ github.ref_name }}" ]; then
26+
if [ "develop" = "${{ github.ref_name }}" ]; then
2727
#NB normally we only clone just the head ref, but fetch-depth: 0 above gets *all* the history
28-
export TEMP="$((`git branch -a | grep r/ | cut -f 4 -d '/' | cut -f 1 -d '.'` + 1)).x"
28+
export TEMP="$((`git branch -a | grep r/ | cut -f 4 -d '/' | sort | tail -n 1 | cut -f 1 -d '.'` + 1)).x"
2929
else
3030
export TEMP=${{ github.ref_name }}
3131
fi

0 commit comments

Comments
 (0)