From d01f3c194347efa5fafd64448c21d2d62d8276bd 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/vmrestore/Makefile | 19 +++++++++++-------- 6 files changed, 49 insertions(+), 31 deletions(-) diff --git a/Makefile b/Makefile index 4e415a8d4..2908fde7e 100644 --- a/Makefile +++ b/Makefile @@ -133,6 +133,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 416128ae4..0ee29504d 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 d1877839a..8406b02e0 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 40b49747d..03cf4cba0 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 609e57c97..711820a94 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/vmrestore/Makefile b/app/vmrestore/Makefile index 314a9a938..dd390fdce 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