From cc4a5464edb19f2c5a4acab608d183710055dd07 Mon Sep 17 00:00:00 2001 From: jcheng-splunk Date: Mon, 27 Sep 2021 17:31:44 -0400 Subject: [PATCH] Ignore branch check for gitlab release --- scripts/release | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/release b/scripts/release index 225d8fb710..643dda8eab 100755 --- a/scripts/release +++ b/scripts/release @@ -153,12 +153,11 @@ parse_args_and_release() { exit 1 fi - if [[ "$stage" != "test" ]] && [[ $(git symbolic-ref HEAD) != "refs/heads/main" ]] && [[ "$force" != "yes" ]]; then - echo "You are releasing a beta/final release from a branch other than main, which is not allowed." >&2 - exit 1 - fi - if [[ "${CI:-}" != "true" ]]; then + if [[ "$stage" != "test" ]] && [[ $(git symbolic-ref HEAD) != "refs/heads/main" ]] && [[ "$force" != "yes" ]]; then + echo "You are releasing a beta/final release from a branch other than main, which is not allowed." >&2 + exit 1 + fi read -p "This is a $stage release of version $new_version, please confirm: [y/N] " [[ ! "$REPLY" =~ ^[Yy]$ ]] && echo "Cancelling release" && exit 1 fi