Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Ignore branch check for gitlab release
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreyc-splunk committed Sep 27, 2021
1 parent 1235912 commit cc4a546
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions scripts/release
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cc4a546

Please sign in to comment.