Create release branches for major releases as well. (#18184)
Austin S. Hemmelgarn committed
Jul 16, 2024 at 12:58 UTC
c16ef62599ebd8a4e54728c798b5507297479367
1 file changed
+5
.github/scripts/prepare-release-base.sh
+5
@@ -166,6 +166,11 @@ elif [ "${EVENT_TYPE}" = 'major' ] && [ "${EVENT_VERSION}" != "nightly" ]; then
166
patch_is_zero || exit 1
167
check_newer_major_version || exit 1
168
check_for_existing_tag || exit 1
169
+ branch_name="$(echo "${EVENT_VERSION}" | cut -f 1-2 -d '.')"
170
+ if [ -n "$(git branch --list "${branch_name}")" ]; then
171
+ echo "::error::A branch named ${branch_name} already exists in the repository."
172
+ exit 1
173
+ fi
174
echo "${EVENT_VERSION}" > packaging/version || exit 1
175
# shellcheck disable=SC2129
176
echo "run=true" >> "${GITHUB_OUTPUT}"