This repository has been archived by the owner on Jun 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 306
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix next tag to be used when cutting a release on a release branch (#…
…4519) Co-authored-by: github-actions <[email protected]>
- Loading branch information
1 parent
7e0c6f3
commit 0acd275
Showing
2 changed files
with
16 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,10 +35,12 @@ git config user.email [email protected] | |
# both main and this new branch because the commit is the same | ||
|
||
# first test the release branch because it gets priority | ||
IS_RELEASE_BRANCH=true | ||
WHICH_BRANCH=$(git branch -a --contains "${ACTUAL_COMMIT_SHA}" | grep remotes | grep -v -e detached -e HEAD | grep -E "\brelease-[0-9]+\.[0-9]+\b" | cut -d "/" -f3) | ||
echo "branch: ${WHICH_BRANCH}" | ||
if [[ "${WHICH_BRANCH}" == "" ]]; then | ||
# now try main since the release branch doesnt exist | ||
IS_RELEASE_BRANCH=false | ||
WHICH_BRANCH=$(git branch -a --contains "${ACTUAL_COMMIT_SHA}" | grep remotes | grep -v -e detached -e HEAD | grep -E "\bmain\b" | cut -d "/" -f3) | ||
echo "branch: ${WHICH_BRANCH}" | ||
if [[ "${WHICH_BRANCH}" == "" ]]; then | ||
|
@@ -58,7 +60,11 @@ git pull origin "${WHICH_BRANCH}" | |
pushd "./hack/release/release" || exit 1 | ||
|
||
PREVIOUS_VERSION=$(cat ../../PREVIOUS_VERSION) | ||
go run ./release.go -previous "${PREVIOUS_VERSION}" -tag "${BUILD_VERSION}" | ||
if [[ "${IS_RELEASE_BRANCH}" == true ]]; then | ||
go run ./release.go -previous "${PREVIOUS_VERSION}" -tag "${BUILD_VERSION}" -relbranch | ||
else | ||
go run ./release.go -previous "${PREVIOUS_VERSION}" -tag "${BUILD_VERSION}" | ||
fi | ||
|
||
popd || exit 1 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters