Skip to content

Commit

Permalink
chore: lint: don't assume upstream is origin (e.g. after $(gh repo fo…
Browse files Browse the repository at this point in the history
…rk))
  • Loading branch information
donaldguy authored and twpayne committed Jun 12, 2024
1 parent 9618e20 commit 75e4680
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ GOLANGCI_LINT_VERSION=$(shell awk '/GOLANGCI_LINT_VERSION:/ { print $$2 }' .gith
GOLINES_VERSION=$(shell awk '/GOLINES_VERSION:/ { print $$2 }' .github/workflows/main.yml)
GORELEASER_VERSION=$(shell awk '/GORELEASER_VERSION:/ { print $$2 }' .github/workflows/main.yml)
GOVERSIONINFO_VERSION=$(shell awk '/GOVERSIONINFO_VERSION:/ { print $$2 }' .github/workflows/main.yml)
UPSTREAM=$(shell git remote -v | awk '/github.com[:\/]twpayne\/chezmoi(.git)? \(fetch\)/ {print $$1}')
ifdef VERSION
GO_LDFLAGS+=-X main.version=${VERSION}
endif
Expand Down Expand Up @@ -121,7 +122,7 @@ lint: ensure-actionlint ensure-editorconfig-checker ensure-find-typos ensure-gol
${GO} run ./internal/cmds/lint-whitespace
find . -name \*.txtar | xargs ${GO} run ./internal/cmds/lint-txtar
./bin/find-typos chezmoi .
go run ./internal/cmds/lint-commit-messages origin/master..HEAD
go run ./internal/cmds/lint-commit-messages ${UPSTREAM}/master..HEAD

.PHONY: format
format: ensure-gofumpt ensure-golines
Expand Down

0 comments on commit 75e4680

Please sign in to comment.