From 106e302d7a1e0c314b36c394f31d06d2e593e7e8 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 31 Jul 2020 13:42:09 +0300 Subject: [PATCH] all: add mssing APP_NAME to vm*-GOARCH builds --- Makefile | 3 +++ app/vmagent/Makefile | 13 ++++++++----- app/vmalert/Makefile | 13 ++++++++----- app/vmauth/Makefile | 13 ++++++++----- app/vmbackup/Makefile | 19 +++++++++++-------- app/vminsert/Makefile | 21 +++++++++++++++++++++ app/vmrestore/Makefile | 19 +++++++++++-------- app/vmselect/Makefile | 21 +++++++++++++++++++++ app/vmstorage/Makefile | 21 +++++++++++++++++++++ 9 files changed, 112 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index c718720a30..c422465d94 100644 --- a/Makefile +++ b/Makefile @@ -152,6 +152,9 @@ app-local: app-local-pure: CGO_ENABLED=0 GO111MODULE=on go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-pure$(RACE) $(PKG_PREFIX)/app/$(APP_NAME) +app-local-with-goarch: + GO111MODULE=on go build $(RACE) -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/$(APP_NAME)-$(GOARCH)$(RACE) $(PKG_PREFIX)/app/$(APP_NAME) + quicktemplate-gen: install-qtc qtc diff --git a/app/vmagent/Makefile b/app/vmagent/Makefile index 416128ae45..0ee29504d3 100644 --- a/app/vmagent/Makefile +++ b/app/vmagent/Makefile @@ -59,19 +59,22 @@ run-vmagent: $(MAKE) run-via-docker vmagent-amd64: - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmagent-amd64 ./app/vmagent + CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmagent-local-with-goarch vmagent-arm: - CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmagent-arm ./app/vmagent + CGO_ENABLED=0 GOARCH=arm $(MAKE) vmagent-local-with-goarch vmagent-arm64: - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmagent-arm64 ./app/vmagent + CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmagent-local-with-goarch vmagent-ppc64le: - CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmagent-ppc64le ./app/vmagent + CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmagent-local-with-goarch vmagent-386: - CGO_ENABLED=0 GOOS=linux GOARCH=386 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmagent-386 ./app/vmagent + CGO_ENABLED=0 GOARCH=386 $(MAKE) vmagent-local-with-goarch + +vmagent-local-with-goarch: + APP_NAME=vmagent $(MAKE) app-local-with-goarch vmagent-pure: APP_NAME=vmagent $(MAKE) app-local-pure diff --git a/app/vmalert/Makefile b/app/vmalert/Makefile index d1877839a9..8406b02e0d 100644 --- a/app/vmalert/Makefile +++ b/app/vmalert/Makefile @@ -69,19 +69,22 @@ run-vmalert: vmalert -evaluationInterval=3s vmalert-amd64: - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmalert-amd64 ./app/vmalert + CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmalert-local-with-goarch vmalert-arm: - CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmalert-arm ./app/vmalert + CGO_ENABLED=0 GOARCH=arm $(MAKE) vmalert-local-with-goarch vmalert-arm64: - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmalert-arm64 ./app/vmalert + CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmalert-local-with-goarch vmalert-ppc64le: - CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmalert-ppc64le ./app/vmalert + CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmalert-local-with-goarch vmalert-386: - CGO_ENABLED=0 GOOS=linux GOARCH=386 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmalert-386 ./app/vmalert + CGO_ENABLED=0 GOARCH=386 $(MAKE) vmalert-local-with-goarch + +vmalert-local-with-goarch: + APP_NAME=vmalert $(MAKE) app-local-with-goarch vmalert-pure: APP_NAME=vmalert $(MAKE) app-local-pure diff --git a/app/vmauth/Makefile b/app/vmauth/Makefile index 40b49747db..03cf4cba0e 100644 --- a/app/vmauth/Makefile +++ b/app/vmauth/Makefile @@ -58,19 +58,22 @@ run-vmauth: $(MAKE) run-via-docker vmauth-amd64: - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmauth-amd64 ./app/vmauth + CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmauth-local-with-goarch vmauth-arm: - CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmauth-arm ./app/vmauth + CGO_ENABLED=0 GOARCH=arm $(MAKE) vmauth-local-with-goarch vmauth-arm64: - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmauth-arm64 ./app/vmauth + CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmauth-local-with-goarch vmauth-ppc64le: - CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmauth-ppc64le ./app/vmauth + CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmauth-local-with-goarch vmauth-386: - CGO_ENABLED=0 GOOS=linux GOARCH=386 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmauth-386 ./app/vmauth + CGO_ENABLED=0 GOARCH=386 $(MAKE) vmauth-local-with-goarch + +vmauth-local-with-goarch: + APP_NAME=vmauth $(MAKE) app-local-with-goarch vmauth-pure: APP_NAME=vmauth $(MAKE) app-local-pure diff --git a/app/vmbackup/Makefile b/app/vmbackup/Makefile index 609e57c976..711820a944 100644 --- a/app/vmbackup/Makefile +++ b/app/vmbackup/Makefile @@ -51,20 +51,23 @@ package-vmbackup-386: publish-vmbackup: APP_NAME=vmbackup $(MAKE) publish-via-docker -vmbackup-pure: - APP_NAME=vmbackup $(MAKE) app-local-pure - vmbackup-amd64: - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmbackup-amd64 ./app/vmbackup + CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmbackup-local-with-goarch vmbackup-arm: - CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmbackup-arm ./app/vmbackup + CGO_ENABLED=0 GOARCH=arm $(MAKE) vmbackup-local-with-goarch vmbackup-arm64: - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmbackup-arm64 ./app/vmbackup + CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmbackup-local-with-goarch vmbackup-ppc64le: - CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmbackup-ppc64le ./app/vmbackup + CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmbackup-local-with-goarch vmbackup-386: - CGO_ENABLED=0 GOOS=linux GOARCH=386 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmbackup-386 ./app/vmbackup + CGO_ENABLED=0 GOARCH=386 $(MAKE) vmbackup-local-with-goarch + +vmbackup-local-with-goarch: + APP_NAME=vmbackup $(MAKE) app-local-with-goarch + +vmbackup-pure: + APP_NAME=vmbackup $(MAKE) app-local-pure diff --git a/app/vminsert/Makefile b/app/vminsert/Makefile index c43b12e6be..4f8f3bdba1 100644 --- a/app/vminsert/Makefile +++ b/app/vminsert/Makefile @@ -32,3 +32,24 @@ publish-vminsert: publish-vminsert-race: APP_NAME=vminsert RACE=-race $(MAKE) publish-via-docker + +vminsert-amd64: + CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vminsert-local-with-goarch + +vminsert-arm: + CGO_ENABLED=0 GOARCH=arm $(MAKE) vminsert-local-with-goarch + +vminsert-arm64: + CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vminsert-local-with-goarch + +vminsert-ppc64le: + CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vminsert-local-with-goarch + +vminsert-386: + CGO_ENABLED=0 GOARCH=386 $(MAKE) vminsert-local-with-goarch + +vminsert-local-with-goarch: + APP_NAME=vminsert $(MAKE) app-local-with-goarch + +vminsert-pure: + APP_NAME=vminsert $(MAKE) app-local-pure diff --git a/app/vmrestore/Makefile b/app/vmrestore/Makefile index 314a9a9386..dd390fdce6 100644 --- a/app/vmrestore/Makefile +++ b/app/vmrestore/Makefile @@ -51,20 +51,23 @@ package-vmrestore-386: publish-vmrestore: APP_NAME=vmrestore $(MAKE) publish-via-docker -vmrestore-pure: - APP_NAME=vmrestore $(MAKE) app-local-pure - vmrestore-amd64: - CGO_ENABLED=1 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmrestore-amd64 ./app/vmrestore + CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmrestore-local-with-goarch vmrestore-arm: - CGO_ENABLED=0 GOOS=linux GOARCH=arm GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmrestore-arm ./app/vmrestore + CGO_ENABLED=0 GOARCH=arm $(MAKE) vmrestore-local-with-goarch vmrestore-arm64: - CGO_ENABLED=0 GOOS=linux GOARCH=arm64 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmrestore-arm64 ./app/vmrestore + CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmrestore-local-with-goarch vmrestore-ppc64le: - CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmrestore-ppc64le ./app/vmrestore + CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmrestore-local-with-goarch vmrestore-386: - CGO_ENABLED=0 GOOS=linux GOARCH=386 GO111MODULE=on go build -mod=vendor -ldflags "$(GO_BUILDINFO)" -o bin/vmrestore-386 ./app/vmrestore + CGO_ENABLED=0 GOARCH=386 $(MAKE) vmrestore-local-with-goarch + +vmrestore-local-with-goarch: + APP_NAME=vmrestore $(MAKE) app-local-with-goarch + +vmrestore-pure: + APP_NAME=vmrestore $(MAKE) app-local-pure diff --git a/app/vmselect/Makefile b/app/vmselect/Makefile index 1ed4e3f0af..a0e2015e87 100644 --- a/app/vmselect/Makefile +++ b/app/vmselect/Makefile @@ -36,3 +36,24 @@ publish-vmselect: publish-vmselect-race: APP_NAME=vmselect RACE=-race $(MAKE) publish-via-docker + +vmselect-amd64: + CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmselect-local-with-goarch + +vmselect-arm: + CGO_ENABLED=0 GOARCH=arm $(MAKE) vmselect-local-with-goarch + +vmselect-arm64: + CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmselect-local-with-goarch + +vmselect-ppc64le: + CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmselect-local-with-goarch + +vmselect-386: + CGO_ENABLED=0 GOARCH=386 $(MAKE) vmselect-local-with-goarch + +vmselect-local-with-goarch: + APP_NAME=vmselect $(MAKE) app-local-with-goarch + +vmselect-pure: + APP_NAME=vmselect $(MAKE) app-local-pure diff --git a/app/vmstorage/Makefile b/app/vmstorage/Makefile index e17e51d5b5..84cdfe28af 100644 --- a/app/vmstorage/Makefile +++ b/app/vmstorage/Makefile @@ -36,3 +36,24 @@ publish-vmstorage: publish-vmstorage-race: APP_NAME=vmstorage RACE=-race $(MAKE) publish-via-docker + +vmstorage-amd64: + CGO_ENABLED=1 GOARCH=amd64 $(MAKE) vmstorage-local-with-goarch + +vmstorage-arm: + CGO_ENABLED=0 GOARCH=arm $(MAKE) vmstorage-local-with-goarch + +vmstorage-arm64: + CGO_ENABLED=0 GOARCH=arm64 $(MAKE) vmstorage-local-with-goarch + +vmstorage-ppc64le: + CGO_ENABLED=0 GOARCH=ppc64le $(MAKE) vmstorage-local-with-goarch + +vmstorage-386: + CGO_ENABLED=0 GOARCH=386 $(MAKE) vmstorage-local-with-goarch + +vmstorage-local-with-goarch: + APP_NAME=vmstorage $(MAKE) app-local-with-goarch + +vmstorage-pure: + APP_NAME=vmstorage $(MAKE) app-local-pure