From 66e5d7b1ca6bd1549c6f73ac830b6d47e681f7cd Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Mon, 12 Oct 2020 09:15:27 +0100 Subject: [PATCH] Prevent publishing a `main` branch --- bin/git-publish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/git-publish b/bin/git-publish index 7cc4e71..ea8453c 100755 --- a/bin/git-publish +++ b/bin/git-publish @@ -7,7 +7,7 @@ $currentBranch = exec('git rev-parse --abbrev-ref HEAD'); -if (in_array($currentBranch, ['develop', 'master', 'staging', 'production'])) { +if (in_array($currentBranch, ['develop', 'main', 'master', 'staging', 'production'])) { print "Currently on ${currentBranch}. Aborting."; exit(1); }