Prepare a golangci-lint installation for automatic update using renovate
Signed-off-by: Jan Rodák <hony.com@seznam.cz>
This commit is contained in:
parent
8960db0702
commit
52828e9aec
7
Makefile
7
Makefile
|
|
@ -32,6 +32,11 @@ BUILDFLAGS := -tags "$(AUTOTAGS) $(TAGS)" $(FLAGS)
|
|||
GO ?= go
|
||||
TESTFLAGS := $(shell $(GO) test -race $(BUILDFLAGS) ./pkg/stringutils 2>&1 > /dev/null && echo -race)
|
||||
|
||||
# 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.60.1
|
||||
|
||||
default all: local-binary docs local-validate local-cross ## validate all checks, build and cross-build\nbinaries and docs
|
||||
|
||||
clean: ## remove all built files
|
||||
|
|
@ -74,7 +79,7 @@ local-validate validate: install.tools ## validate DCO on the host
|
|||
@./hack/git-validation.sh
|
||||
|
||||
install.tools:
|
||||
$(MAKE) -C tests/tools
|
||||
$(MAKE) -C tests/tools GOLANGCI_LINT_VERSION=$(GOLANGCI_LINT_VERSION)
|
||||
|
||||
install.docs: docs
|
||||
$(MAKE) -C docs install
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
GO := go
|
||||
BUILDDIR := build
|
||||
GOLANGCI_LINT_VERSION := 1.60.1
|
||||
|
||||
all: $(BUILDDIR)
|
||||
|
||||
|
|
@ -31,4 +30,5 @@ $(BUILDDIR)/go-md2man:
|
|||
$(call go-build,./vendor/github.com/cpuguy83/go-md2man)
|
||||
|
||||
$(BUILDDIR)/golangci-lint:
|
||||
@[ "${GOLANGCI_LINT_VERSION}" ] || ( echo "GOLANGCI_LINT_VERSION is not set"; exit 1 )
|
||||
curl -fsSL https://raw.githubusercontent.com/golangci/golangci-lint/v$(GOLANGCI_LINT_VERSION)/install.sh | sh -s -- -b ./$(BUILDDIR) v$(GOLANGCI_LINT_VERSION)
|
||||
|
|
|
|||
Loading…
Reference in New Issue