Skip to content

Commit

Permalink
fix branch check
Browse files Browse the repository at this point in the history
  • Loading branch information
nonrational committed Oct 25, 2024
1 parent 1f421ae commit 2c02823
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ whats-going-to-prod:
@read -p"Press [Enter] to continue, ^C to abort..." _

check-repo:
@test $(BRANCH) = main || (echo "You are not in the main branch" && exit 1)
@test $(git rev-parse --abbrev-ref HEAD) = main || (echo "You are not in the main branch" && exit 1)
@git pull --ff-only origin HEAD
@test $(shell git rev-parse origin/HEAD) = $(shell git rev-parse HEAD) || (echo "You have commits that have not been pushed" && exit 1)
@test -z "$(shell git status -s)" || (echo "You have uncommited changes in this branch" && exit 1)

0 comments on commit 2c02823

Please sign in to comment.