From 92e324f182ecf5b7afe7464ac2295855db445868 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 15 Apr 2022 22:03:50 +0200 Subject: Merging upstream version 1.34.1. Signed-off-by: Daniel Baumann --- .github/scripts/prepare-release-base.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to '.github/scripts') diff --git a/.github/scripts/prepare-release-base.sh b/.github/scripts/prepare-release-base.sh index cb6be8e7c..838c4e86b 100755 --- a/.github/scripts/prepare-release-base.sh +++ b/.github/scripts/prepare-release-base.sh @@ -121,14 +121,13 @@ 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_number || exit 1 + check_newer_patch_version || exit 1 echo "${EVENT_VERSION}" > packaging/version || exit 1 echo "::set-output name=run::true" echo "::set-output name=message::Patch release ${EVENT_VERSION}." @@ -148,14 +147,13 @@ elif [ "${EVENT_TYPE}" = 'minor' ] && [ "${EVENT_VERSION}" != "nightly" ]; then echo "::error::A branch named ${branch_name} already exists in the repository." exit 1 fi - git branch "${branch_name}" - git checkout "${branch_name}" echo "${EVENT_VERSION}" > packaging/version || exit 1 echo "::set-output name=run::true" echo "::set-output name=message::Minor release ${EVENT_VERSION}." echo "::set-output name=ref::${EVENT_VERSION}" echo "::set-output name=type::release" - echo "::set-output name=branch::${branch_name}" + echo "::set-output name=branch::master" + echo "::set-output name=new-branch:${branch_name}" echo "::set-output name=version::$(tr -d 'v' < packaging/version)" elif [ "${EVENT_TYPE}" = 'major' ] && [ "${EVENT_VERSION}" != "nightly" ]; then echo "::notice::Preparing a major release build." -- cgit v1.2.3