Skip to content

Commit

Permalink
Merge pull request #35 from devops-infra/bugfix/ambiguous-argument-error
Browse files Browse the repository at this point in the history
Fixed crashing and causing issues when source branch has 'master' (old school) or 'main' (new repos) in its name.
  • Loading branch information
ChristophShyper authored Feb 22, 2021
2 parents b839ffc + 5b66164 commit 978bdad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
phony: help

# Release tag for the action
VERSION := v0.1
VERSION := v0.2

# GitHub Actions bogus variables
GITHUB_REF ?= refs/heads/null
Expand Down
2 changes: 1 addition & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ if [[ $(git rev-parse --revs-only "${SOURCE_BRANCH}") == $(git rev-parse --revs-
fi

echo -e "\nComparing branches by diff"
if [[ -z $(git diff "${TARGET_BRANCH}..${SOURCE_BRANCH}") ]]; then
if [[ -z $(git diff "remotes/origin/${TARGET_BRANCH}..remotes/origin/${SOURCE_BRANCH}") ]]; then
echo -e "\n[INFO] Both branches are the same. No action needed."
exit 0
fi
Expand Down

0 comments on commit 978bdad

Please sign in to comment.