diff --git a/hooks/pre-push b/hooks/pre-push index 1c3d4b9..e05535a 100755 --- a/hooks/pre-push +++ b/hooks/pre-push @@ -21,6 +21,15 @@ while read -r local_ref local_sha remote_ref remote_sha; do fi done +if [[ "$should_release" != true ]]; then + current_branch="$(git -C "$ROOT_DIR" symbolic-ref --short -q HEAD || true)" + if [[ "$current_branch" == "master" ]]; then + should_release=true + release_local_ref="refs/heads/master" + release_remote_ref="refs/heads/master" + fi +fi + if [[ "$should_release" != true ]]; then exit 0 fi