Skip to content

Commit

Permalink
chore(build): add LOGFROM flag to check-pr rule
Browse files Browse the repository at this point in the history
With this flag, the git log output is filtered to only include commits
from the specified commit to the current HEAD.

make check-pr                # from main (default)
make check-pr LOGFROM=v0.1.0 # from tag/branch
make check-pr LOGFROM=HEAD~1 # from commit
make check-pr LOGFROM=f3a4b2 # from commit
  • Loading branch information
geyslan committed Jul 27, 2023
1 parent efa0ec4 commit 93a5329
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -858,6 +858,8 @@ check-err: \
# pull request verifier
#

LOGFROM ?= main

.PHONY: check-pr
check-pr: \
check-fmt check-lint check-code \
Expand All @@ -868,7 +870,7 @@ check-pr: \
@echo

@$(CMD_GIT) \
log main..HEAD \
log $(LOGFROM)..HEAD \
--pretty=format:'%C(auto,yellow)%h%Creset **%C(auto,red)%s%Creset** _<sub>%C(auto,cyan)(%ad)%Creset %C(auto,green)%an \<%ae\>%Creset</sub>_%n%n```%n%b```%n' \
--date=format:"%Y/%b/%d"

Expand Down

0 comments on commit 93a5329

Please sign in to comment.