From aeec45bc3d3d3b4b07637e24254f8a5dcda50482 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Mon, 31 Jul 2023 23:32:19 -0400 Subject: [PATCH] releng/tag-release.sh: relax branch requirement --- releng/tag-release.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/releng/tag-release.sh b/releng/tag-release.sh index 77db6e551..b508659ee 100755 --- a/releng/tag-release.sh +++ b/releng/tag-release.sh @@ -23,10 +23,18 @@ if [ ! -e bin/generate-zbm ] || [ ! -e docs/CHANGELOG.md ]; then error "ERROR: run this script from the root of the zfsbootmenu tree" fi -# Only tag releases from master -if [ "$(git rev-parse --abbrev-ref HEAD)" != "master" ]; then - error "ERROR: will not tag releases on any branch but master" -fi +# Only tag releases from master or a compatible release-tracking branch +case "$(git rev-parse --abbrev-ref HEAD)" in + master) + echo "Tagging release from master branch" + ;; + "v${release%.*}.x"|"v${release%%.*}.x") + echo "Tagging release from version-tracking branch" + ;; + *) + error "ERROR: attempt to tag release on incompatible branch" + ;; +esac # Only allow changes to CHANGELOG.md when tagging releases # shellcheck disable=SC2143