summaryrefslogtreecommitdiffstats
path: root/.github/scripts
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2022-04-15 09:39:42 -0400
committerAustin S. Hemmelgarn <austin@netdata.cloud>2022-04-15 09:39:42 -0400
commite9d3f22fce5eea37593e0f23100edfcdf6fc3c8b (patch)
treeac592a41ceae8b610ecfe2c6df271cfa36f221db /.github/scripts
parent325a42a3392f0058d8b7d3ec8d507e77ecd47b93 (diff)
Fix branch handling for patch releases.
Diffstat (limited to '.github/scripts')
-rwxr-xr-x.github/scripts/prepare-release-base.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/.github/scripts/prepare-release-base.sh b/.github/scripts/prepare-release-base.sh
index cce12b7cc1..838c4e86b2 100755
--- a/.github/scripts/prepare-release-base.sh
+++ b/.github/scripts/prepare-release-base.sh
@@ -121,11 +121,10 @@ elif [ "${EVENT_TYPE}" = 'patch' ] && [ "${EVENT_VERSION}" != "nightly" ]; then
check_version_format || exit 1
check_for_existing_tag || exit 1
branch_name="$(echo "${EVENT_VERSION}" | cut -f 1-2 -d '.')"
- if [ -z "$(git branch --list "${branch_name}")" ]; then
+ if ! git checkout "${branch_name}"; then
echo "::error::Could not find a branch for the ${branch_name}.x release series."
exit 1
fi
- git checkout "${branch_name}"
minor_matches || exit 1
major_matches || exit 1
check_newer_patch_version || exit 1