From 98bd1de1cd5c5a8406b85ac7898163a2e9e71fbb Mon Sep 17 00:00:00 2001 From: Wolfgang Walther Date: Wed, 25 Oct 2023 16:29:03 +0200 Subject: [PATCH] nix: Allow running postgrest-release on rel- branches --- nix/tools/release/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nix/tools/release/default.nix b/nix/tools/release/default.nix index 15df271794..46d8bee22d 100644 --- a/nix/tools/release/default.nix +++ b/nix/tools/release/default.nix @@ -56,8 +56,8 @@ let inRootDir = true; } '' - trap "echo You need to be on the main branch to proceed. Exiting ..." ERR - [ "$(git rev-parse --abbrev-ref HEAD)" == "main" ] + trap "echo You need to be on the main branch or a release branch to proceed. Exiting ..." ERR + [[ "$(git rev-parse --abbrev-ref HEAD)" =~ ^main$|^rel- ]] trap "" ERR trap "echo You have uncommitted changes in postgrest.cabal. Exiting ..." ERR