mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-13 13:11:37 +01:00
Makefile: remove redundant -mod=vendor
option when running Go tools
The `-mod=vendor` is automatically set when there is a `vendor` directory starting from Go1.14 - see https://go.dev/doc/go1.14#go-command Since the minimum supported Go version for VictoriaMetrics is Go1.17, then the `-mod=vendor` option is no longer needed.
This commit is contained in:
parent
ed891049d5
commit
573f6c8d6c
30
Makefile
30
Makefile
@ -137,8 +137,8 @@ fmt:
|
|||||||
gofmt -l -w -s ./app
|
gofmt -l -w -s ./app
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
go vet -mod=vendor ./lib/...
|
go vet ./lib/...
|
||||||
go vet -mod=vendor ./app/...
|
go vet ./app/...
|
||||||
|
|
||||||
lint: install-golint
|
lint: install-golint
|
||||||
golint lib/...
|
golint lib/...
|
||||||
@ -165,27 +165,27 @@ install-errcheck:
|
|||||||
check-all: fmt vet lint errcheck golangci-lint
|
check-all: fmt vet lint errcheck golangci-lint
|
||||||
|
|
||||||
test:
|
test:
|
||||||
go test -mod=vendor ./lib/... ./app/...
|
go test ./lib/... ./app/...
|
||||||
|
|
||||||
test-race:
|
test-race:
|
||||||
go test -mod=vendor -race ./lib/... ./app/...
|
go test -race ./lib/... ./app/...
|
||||||
|
|
||||||
test-pure:
|
test-pure:
|
||||||
CGO_ENABLED=0 go test -mod=vendor ./lib/... ./app/...
|
CGO_ENABLED=0 go test ./lib/... ./app/...
|
||||||
|
|
||||||
test-full:
|
test-full:
|
||||||
go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/...
|
go test -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/...
|
||||||
|
|
||||||
test-full-386:
|
test-full-386:
|
||||||
GOARCH=386 go test -mod=vendor -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/...
|
GOARCH=386 go test -coverprofile=coverage.txt -covermode=atomic ./lib/... ./app/...
|
||||||
|
|
||||||
benchmark:
|
benchmark:
|
||||||
go test -mod=vendor -bench=. ./lib/...
|
go test -bench=. ./lib/...
|
||||||
go test -mod=vendor -bench=. ./app/...
|
go test -bench=. ./app/...
|
||||||
|
|
||||||
benchmark-pure:
|
benchmark-pure:
|
||||||
CGO_ENABLED=0 go test -mod=vendor -bench=. ./lib/...
|
CGO_ENABLED=0 go test -bench=. ./lib/...
|
||||||
CGO_ENABLED=0 go test -mod=vendor -bench=. ./app/...
|
CGO_ENABLED=0 go test -bench=. ./app/...
|
||||||
|
|
||||||
vendor-update:
|
vendor-update:
|
||||||
go get -u -d ./lib/...
|
go get -u -d ./lib/...
|
||||||
@ -194,16 +194,16 @@ vendor-update:
|
|||||||
go mod vendor
|
go mod vendor
|
||||||
|
|
||||||
app-local:
|
app-local:
|
||||||
CGO_ENABLED=1 go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME)
|
CGO_ENABLED=1 go build $(RACE) -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME)
|
||||||
|
|
||||||
app-local-pure:
|
app-local-pure:
|
||||||
CGO_ENABLED=0 go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-pure$(RACE) $(PKG_PREFIX)/app/$(APP_NAME)
|
CGO_ENABLED=0 go build $(RACE) -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-pure$(RACE) $(PKG_PREFIX)/app/$(APP_NAME)
|
||||||
|
|
||||||
app-local-goos-goarch:
|
app-local-goos-goarch:
|
||||||
CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-$(GOOS)-$(GOARCH)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME)
|
CGO_ENABLED=$(CGO_ENABLED) GOOS=$(GOOS) GOARCH=$(GOARCH) go build $(RACE) -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-$(GOOS)-$(GOARCH)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME)
|
||||||
|
|
||||||
app-local-windows-goarch:
|
app-local-windows-goarch:
|
||||||
CGO_ENABLED=0 GOOS=windows GOARCH=$(GOARCH) go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-windows-$(GOARCH)$(RACE).exe $(PKG_PREFIX)/app/$(APP_NAME)
|
CGO_ENABLED=0 GOOS=windows GOARCH=$(GOARCH) go build $(RACE) -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-windows-$(GOARCH)$(RACE).exe $(PKG_PREFIX)/app/$(APP_NAME)
|
||||||
|
|
||||||
quicktemplate-gen: install-qtc
|
quicktemplate-gen: install-qtc
|
||||||
qtc
|
qtc
|
||||||
|
@ -36,7 +36,7 @@ app-via-docker: package-builder
|
|||||||
--env GOCACHE=/gocache \
|
--env GOCACHE=/gocache \
|
||||||
$(DOCKER_OPTS) \
|
$(DOCKER_OPTS) \
|
||||||
$(BUILDER_IMAGE) \
|
$(BUILDER_IMAGE) \
|
||||||
go build $(RACE) -mod=vendor -trimpath -buildvcs=false \
|
go build $(RACE) -trimpath -buildvcs=false \
|
||||||
-ldflags "-extldflags '-static' $(GO_BUILDINFO)" \
|
-ldflags "-extldflags '-static' $(GO_BUILDINFO)" \
|
||||||
-tags 'netgo osusergo nethttpomithttp2 musl' \
|
-tags 'netgo osusergo nethttpomithttp2 musl' \
|
||||||
-o bin/$(APP_NAME)$(APP_SUFFIX)-prod $(PKG_PREFIX)/app/$(APP_NAME)
|
-o bin/$(APP_NAME)$(APP_SUFFIX)-prod $(PKG_PREFIX)/app/$(APP_NAME)
|
||||||
@ -51,7 +51,7 @@ app-via-docker-windows: package-builder
|
|||||||
--env GOCACHE=/gocache \
|
--env GOCACHE=/gocache \
|
||||||
$(DOCKER_OPTS) \
|
$(DOCKER_OPTS) \
|
||||||
$(BUILDER_IMAGE) \
|
$(BUILDER_IMAGE) \
|
||||||
go build $(RACE) -mod=vendor -trimpath -buildvcs=false \
|
go build $(RACE) -trimpath -buildvcs=false \
|
||||||
-ldflags "-s -w -extldflags '-static' $(GO_BUILDINFO)" \
|
-ldflags "-s -w -extldflags '-static' $(GO_BUILDINFO)" \
|
||||||
-tags 'netgo osusergo nethttpomithttp2' \
|
-tags 'netgo osusergo nethttpomithttp2' \
|
||||||
-o bin/$(APP_NAME)-windows$(APP_SUFFIX)-prod.exe $(PKG_PREFIX)/app/$(APP_NAME)
|
-o bin/$(APP_NAME)-windows$(APP_SUFFIX)-prod.exe $(PKG_PREFIX)/app/$(APP_NAME)
|
||||||
|
@ -943,7 +943,7 @@ Released at 02-03-2021
|
|||||||
* FEATURE: vmagent: optimize [relabeling](https://docs.victoriametrics.com/vmagent.html#relabeling) performance for common cases.
|
* FEATURE: vmagent: optimize [relabeling](https://docs.victoriametrics.com/vmagent.html#relabeling) performance for common cases.
|
||||||
* FEATURE: add `increase_pure(m[d])` function to MetricsQL. It works the same as `increase(m[d])` except of various edge cases. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962) for details.
|
* FEATURE: add `increase_pure(m[d])` function to MetricsQL. It works the same as `increase(m[d])` except of various edge cases. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/962) for details.
|
||||||
* FEATURE: increase accuracy for `buckets_limit(limit, buckets)` results for small `limit` values. See [MetricsQL docs](https://docs.victoriametrics.com/MetricsQL.html) for details.
|
* FEATURE: increase accuracy for `buckets_limit(limit, buckets)` results for small `limit` values. See [MetricsQL docs](https://docs.victoriametrics.com/MetricsQL.html) for details.
|
||||||
* FEATURE: vmagent: initial support for Windows build with `CGO_ENABLED=0 GOOS=windows go build -mod=vendor ./app/vmagent`. See [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/70) and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1036).
|
* FEATURE: vmagent: initial support for Windows build with `CGO_ENABLED=0 GOOS=windows go build ./app/vmagent`. See [this](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/70) and [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1036).
|
||||||
* FEATURE: vmagent: support WebIdentityToken auth in EC2 service discovery. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1080) for details.
|
* FEATURE: vmagent: support WebIdentityToken auth in EC2 service discovery. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1080) for details.
|
||||||
* FEATURE: vmalert: properly process query params in `-datasource.url` and `-remoteRead.url` command-line flags. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1087) for details.
|
* FEATURE: vmalert: properly process query params in `-datasource.url` and `-remoteRead.url` command-line flags. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1087) for details.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user