From 23fd05494d1dfcbfb55b3aabbef7745845aff6b7 Mon Sep 17 00:00:00 2001 From: Alex Vandiver Date: Thu, 6 Jul 2023 18:56:34 +0000 Subject: [PATCH] release: Release 8.0-prereleases from `main`. --- tools/release | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tools/release b/tools/release index 9efad629f0..c0a2259e06 100755 --- a/tools/release +++ b/tools/release @@ -30,16 +30,14 @@ if [[ "$version" =~ -[0-9a-z]+$ ]]; then fi is_major_release= -if [[ "$version" =~ ^[0-9]+\.0$ ]]; then +if [[ "$version" =~ ^[0-9]+\.0(-[0-9a-z]+)?$ ]]; then [ "$branch" == "main" ] \ || fail "Did not expect $version to be released from $branch, expected main" - is_major_release=1 -else - if [ -n "$is_prerelease" ]; then - expected_branch="${version}-branch" - else - expected_branch="$(echo "$version" | perl -ple 's/\..*/.x/')" + if [ -z "$is_prerelease" ]; then + is_major_release=1 fi +else + expected_branch="$(echo "$version" | perl -ple 's/\..*/.x/')" [ "$branch" == "$expected_branch" ] \ || fail "Did not expect $version to be released from $branch, expected $expected_branch" fi