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

Commit cc4a546

Browse files
Ignore branch check for gitlab release
1 parent 1235912 commit cc4a546

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

scripts/release

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,11 @@ parse_args_and_release() {
153153
exit 1
154154
fi
155155

156-
if [[ "$stage" != "test" ]] && [[ $(git symbolic-ref HEAD) != "refs/heads/main" ]] && [[ "$force" != "yes" ]]; then
157-
echo "You are releasing a beta/final release from a branch other than main, which is not allowed." >&2
158-
exit 1
159-
fi
160-
161156
if [[ "${CI:-}" != "true" ]]; then
157+
if [[ "$stage" != "test" ]] && [[ $(git symbolic-ref HEAD) != "refs/heads/main" ]] && [[ "$force" != "yes" ]]; then
158+
echo "You are releasing a beta/final release from a branch other than main, which is not allowed." >&2
159+
exit 1
160+
fi
162161
read -p "This is a $stage release of version $new_version, please confirm: [y/N] "
163162
[[ ! "$REPLY" =~ ^[Yy]$ ]] && echo "Cancelling release" && exit 1
164163
fi

0 commit comments

Comments
 (0)