aboutsummaryrefslogtreecommitdiff
path: root/aux/workflow/dist.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-08-28 08:42:38 -0300
committerEuAndreh <eu@euandre.org>2021-08-28 08:42:38 -0300
commit2ed7a449ff9857137e8e37b895a28380835eaf93 (patch)
tree177593b4732d5cfca0b98c68e21f61396c5f0544 /aux/workflow/dist.sh
parentTODOs.md: Mark #task-c88197ce-ade4-2d30-07fb-b52cf004a201 as DONE (diff)
downloadgit-permalink-2ed7a449ff9857137e8e37b895a28380835eaf93.tar.gz
git-permalink-2ed7a449ff9857137e8e37b895a28380835eaf93.tar.xz
aux/workflow/dist.sh: Prevent release being made outside the "main" branch
Diffstat (limited to 'aux/workflow/dist.sh')
-rwxr-xr-xaux/workflow/dist.sh6
1 files changed, 6 insertions, 0 deletions
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