Skip to content

Commit

Permalink
Use origin/latest in case latest
Browse files Browse the repository at this point in the history
Use origin/latest when using 'git merge-base' to check if tag is on
latest branch, in case it has never been checked out locally.
  • Loading branch information
adriansuarez committed Sep 4, 2023
1 parent c1de519 commit cdd374c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/update-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ case "$TAG" in
BRANCH_FROM="${PREFIX}.0"
echo "Branch $BRANCH does not exist. Creating it off of tag $BRANCH_FROM..."
# Make sure <major>.<minor>.0 tag is on branch latest
if [ "$(git rev-parse "$BRANCH_FROM")" != "$(git merge-base latest "$BRANCH_FROM")" ]; then
if [ "$(git rev-parse "$BRANCH_FROM")" != "$(git merge-base origin/latest "$BRANCH_FROM")" ]; then
fail "ERROR: Tag $BRANCH_FROM is not on branch latest"
fi

Expand Down

0 comments on commit cdd374c

Please sign in to comment.