From c04ee48bcbed0e9767448b265c93be1f48bbd9d5 Mon Sep 17 00:00:00 2001 From: Chris Evich Date: Wed, 21 Jun 2023 15:01:43 -0400 Subject: [PATCH] Help Renovate manage the golangci-lint version It's a bit cumbersome to manage a tooling version buried deep in a command, let alone one also buried deep in a `Makefile`. Add a variable to hold the version number so renovate can easily manage it. This happens via a `regex` manager in the shared configuration include `containers/automation//renovate/defaults.json5`. Also add a helpful note/reminder to humans who may want to manually change the version for some reason. Depends on: https://github.com/containers/automation/pull/145 Signed-off-by: Chris Evich --- Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 46aa4d29..981760c6 100644 --- a/Makefile +++ b/Makefile @@ -24,6 +24,11 @@ GOBIN := $(shell $(GO) env GOBIN) GOOS ?= $(shell go env GOOS) GOARCH ?= $(shell go env GOARCH) +# N/B: This value is managed by Renovate, manual changes are +# possible, as long as they don't disturb the formatting +# (i.e. DO NOT ADD A 'v' prefix!) +GOLANGCI_LINT_VERSION := 1.53.2 + ifeq ($(GOBIN),) GOBIN := $(GOPATH)/bin endif @@ -183,7 +188,7 @@ shell: tools: if [ ! -x "$(GOBIN)/golangci-lint" ]; then \ - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v1.52.2 ; \ + curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(GOBIN) v$(GOLANGCI_LINT_VERSION) ; \ fi check: validate test-unit test-integration test-system