From bf2098065af7c758bed2cd674b56409299304441 Mon Sep 17 00:00:00 2001 From: Justin Poehnelt Date: Wed, 18 Mar 2020 19:08:26 -0700 Subject: [PATCH] fix: dry_run should work when no branch --- actions/gapic/entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/gapic/entrypoint.sh b/actions/gapic/entrypoint.sh index b5a8b25..ba89092 100755 --- a/actions/gapic/entrypoint.sh +++ b/actions/gapic/entrypoint.sh @@ -57,7 +57,7 @@ if [ $differs_from_master ]; then [[ -n $(git ls-remote --heads origin ${BRANCH}) ]] && has_branch=1 || has_branch=0 - if [[ !$has_branch || -n $(git diff "origin/${BRANCH}") && -z $INPUT_DRY_RUN ]]; then + if [[ ( !$has_branch || -n $(git diff "origin/${BRANCH}") ) && -z $INPUT_DRY_RUN ]]; then git push -f -u origin $BRANCH curl \