From 2ed7a449ff9857137e8e37b895a28380835eaf93 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 28 Aug 2021 08:42:38 -0300 Subject: aux/workflow/dist.sh: Prevent release being made outside the "main" branch --- aux/workflow/dist.sh | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'aux/workflow') diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh index 69c0173..a8ec82f 100755 --- a/aux/workflow/dist.sh +++ b/aux/workflow/dist.sh @@ -42,6 +42,12 @@ if [ -z "${PROJECT_UC:-}" ]; then PROJECT_UC="$PROJECT" fi + +if [ "$(git rev-parse --abbrev-ref HEAD)" != 'main' ]; then + echo 'Not on branch "main".' >&2 + exit 1 +fi + if git show "$VVERSION" 1>/dev/null 2>/dev/null; then echo "Version '$VVERSION' already exists." >&2 exit 1 -- cgit v1.2.3