Skip to content

Commit

Permalink
Prepare a golangci-lint installation for automatic update using renovate
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Rodák <[email protected]>
  • Loading branch information
Honny1 committed Aug 19, 2024
1 parent 8960db0 commit 52828e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/tools/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
GO := go
BUILDDIR := build
GOLANGCI_LINT_VERSION := 1.60.1

all: $(BUILDDIR)

Expand Down Expand Up @@ -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)

0 comments on commit 52828e9

Please sign in to comment.