mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-13 13:11:37 +01:00
Makefile: pass GO111MODULE=on
to all the go
invocations
This commit is contained in:
parent
c944de68cd
commit
3b52adaf3f
21
Makefile
21
Makefile
@ -33,12 +33,12 @@ package: \
|
|||||||
package-vminsert
|
package-vminsert
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
gofmt -l -w -s ./lib
|
GO111MODULE=on gofmt -l -w -s ./lib
|
||||||
gofmt -l -w -s ./app
|
GO111MODULE=on gofmt -l -w -s ./app
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
go vet $(PKG_PREFIX)/lib/...
|
GO111MODULE=on go vet ./lib/...
|
||||||
go vet $(PKG_PREFIX)/app/...
|
GO111MODULE=on go vet ./app/...
|
||||||
|
|
||||||
lint: install-golint
|
lint: install-golint
|
||||||
golint lib/...
|
golint lib/...
|
||||||
@ -57,15 +57,18 @@ install-errcheck:
|
|||||||
which errcheck || GO111MODULE=off go get -u github.com/kisielk/errcheck
|
which errcheck || GO111MODULE=off go get -u github.com/kisielk/errcheck
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test $(PKG_PREFIX)/lib/...
|
GO111MODULE=on go test ./lib/...
|
||||||
|
GO111MODULE=on go test ./app/...
|
||||||
|
|
||||||
benchmark:
|
benchmark:
|
||||||
go test -bench=. $(PKG_PREFIX)/lib/...
|
GO111MODULE=on go test -bench=. ./lib/...
|
||||||
|
GO111MODULE=on go test -bench=. ./app/...
|
||||||
|
|
||||||
vendor-update:
|
vendor-update:
|
||||||
go get -u
|
GO111MODULE=on go get -u ./lib/...
|
||||||
go mod tidy
|
GO111MODULE=on go get -u ./app/...
|
||||||
go mod vendor
|
GO111MODULE=on go mod tidy
|
||||||
|
GO111MODULE=on go mod vendor
|
||||||
|
|
||||||
app-local:
|
app-local:
|
||||||
GO111MODULE=on go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME)
|
GO111MODULE=on go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME)
|
||||||
|
@ -20,6 +20,7 @@ app-via-docker: package-certs package-builder
|
|||||||
-w /VictoriaMetrics \
|
-w /VictoriaMetrics \
|
||||||
--mount type=bind,src="$(shell pwd)/gocache-for-docker",dst=/gocache \
|
--mount type=bind,src="$(shell pwd)/gocache-for-docker",dst=/gocache \
|
||||||
--env GOCACHE=/gocache \
|
--env GOCACHE=/gocache \
|
||||||
|
--env GO111MODULE=on \
|
||||||
$(BUILDER_IMAGE) \
|
$(BUILDER_IMAGE) \
|
||||||
go build $(RACE) -mod=vendor -ldflags "-s -w -extldflags '-static' $(GO_BUILDINFO)" -tags 'netgo osusergo' -o bin/$(APP_NAME)-prod $(PKG_PREFIX)/app/$(APP_NAME)
|
go build $(RACE) -mod=vendor -ldflags "-s -w -extldflags '-static' $(GO_BUILDINFO)" -tags 'netgo osusergo' -o bin/$(APP_NAME)-prod $(PKG_PREFIX)/app/$(APP_NAME)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user