Skip to content

Commit

Permalink
Filter out extra line when searching for release origin branch
Browse files Browse the repository at this point in the history
lately, but not always, the output of `git branch -a --contains` started
to include one extra line:

```
  remotes/origin/HEAD -> origin/dev
  remotes/origin/dev
```

The `remotes/origin/HEAD -> origin/dev` is what breaks the sanity check
script b/c this is something new, that git has started to report in its
output. For example broke here:
https://github.com/gluwa/creditcoin3/actions/runs/12985577903/job/36210711957

but not here:
https://github.com/gluwa/creditcoin3/actions/runs/12914730298/job/36014957248
  • Loading branch information
atodorov committed Jan 27, 2025
1 parent e827472 commit 8383f49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/check-tag-suffix-vs-origin-branch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ echo "----- DEBUG -----"
git branch -a --contains | grep remotes/origin
echo "----- END -----"

NEAREST_GIT_BRANCH=$(git branch -a --contains | grep remotes/origin | cut -f3 -d/)
NEAREST_GIT_BRANCH=$(git branch -a --contains | grep -v remotes/origin/HEAD | grep remotes/origin | cut -f3 -d/)

echo "INFO: git tag: '$GIT_TAG'"
echo "INFO: suffix from git tag: '$SUFFIX_FROM_GIT_TAG'"
Expand Down

0 comments on commit 8383f49

Please sign in to comment.