Skip to content

Commit

Permalink
build: don't reinstall golangci-lint if already installed (#21662)
Browse files Browse the repository at this point in the history
(cherry picked from commit 979f885)
  • Loading branch information
alessio authored and mergify[bot] committed Sep 12, 2024
1 parent e7724c6 commit 8399601
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/build/linting.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
golangci_version=v1.60.1
golangci_installed_version=$(shell golangci-lint version --format short 2>/dev/null)

#? setup-pre-commit: Set pre-commit git hook
setup-pre-commit:
Expand All @@ -9,8 +10,10 @@ setup-pre-commit:

#? lint-install: Install golangci-lint
lint-install:
ifneq ($(golangci_installed_version),$(golangci_version))
@echo "--> Installing golangci-lint $(golangci_version)"
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)
endif

#? lint: Run golangci-lint
lint:
Expand Down

0 comments on commit 8399601

Please sign in to comment.