ci: use Go version from build.env for golangci-lint

Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
Niels de Vos 2025-04-03 13:06:16 +02:00 committed by nixpanic
parent ae955623f3
commit 5d6cf4ac2a
2 changed files with 4 additions and 0 deletions

View File

@ -117,12 +117,14 @@ mod-check: check-env
done
test -z "$(shell git status --short)" || (echo "files were modified during go mod checks: " ; git status --short ; false)
scripts/golangci.yml: GOVERSION ?= $(shell . $(CURDIR)/build.env ; echo go$${GOLANG_VERSION})
scripts/golangci.yml: scripts/golangci.yml.in
rm -f scripts/golangci.yml.buildtags.in
for tag in $(GO_TAGS_LIST); do \
echo " - $$tag" >> scripts/golangci.yml.buildtags.in ; \
done
sed "/@@BUILD_TAGS@@/r scripts/golangci.yml.buildtags.in" scripts/golangci.yml.in | sed '/@@BUILD_TAGS@@/d' > scripts/golangci.yml
sed "s/@@GOVERSION@@/$(GOVERSION)/" -i scripts/golangci.yml
go-lint: scripts/golangci.yml
./scripts/lint-go.sh

View File

@ -8,6 +8,8 @@ run:
build-tags:
@@BUILD_TAGS@@
go: '@@GOVERSION@@'
# default concurrency is a available CPU number
concurrency: 4