mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-05-28 17:46:41 +00:00
ci: use Go version from build.env for golangci-lint
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
parent
ae955623f3
commit
5d6cf4ac2a
2
Makefile
2
Makefile
@ -117,12 +117,14 @@ mod-check: check-env
|
|||||||
done
|
done
|
||||||
test -z "$(shell git status --short)" || (echo "files were modified during go mod checks: " ; git status --short ; false)
|
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
|
scripts/golangci.yml: scripts/golangci.yml.in
|
||||||
rm -f scripts/golangci.yml.buildtags.in
|
rm -f scripts/golangci.yml.buildtags.in
|
||||||
for tag in $(GO_TAGS_LIST); do \
|
for tag in $(GO_TAGS_LIST); do \
|
||||||
echo " - $$tag" >> scripts/golangci.yml.buildtags.in ; \
|
echo " - $$tag" >> scripts/golangci.yml.buildtags.in ; \
|
||||||
done
|
done
|
||||||
sed "/@@BUILD_TAGS@@/r scripts/golangci.yml.buildtags.in" scripts/golangci.yml.in | sed '/@@BUILD_TAGS@@/d' > scripts/golangci.yml
|
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
|
go-lint: scripts/golangci.yml
|
||||||
./scripts/lint-go.sh
|
./scripts/lint-go.sh
|
||||||
|
@ -8,6 +8,8 @@ run:
|
|||||||
build-tags:
|
build-tags:
|
||||||
@@BUILD_TAGS@@
|
@@BUILD_TAGS@@
|
||||||
|
|
||||||
|
go: '@@GOVERSION@@'
|
||||||
|
|
||||||
# default concurrency is a available CPU number
|
# default concurrency is a available CPU number
|
||||||
concurrency: 4
|
concurrency: 4
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user