From 4493d9d602eb581540fe9303ba9199f5a39b1b82 Mon Sep 17 00:00:00 2001 From: Manuel de Brito Fontes Date: Fri, 30 Jun 2017 16:19:41 -0400 Subject: [PATCH] Add release task in Makefiles and avoid multiple builds --- Makefile | 4 ++++ controllers/nginx/Makefile | 7 +++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 1e434fa03..2c1188922 100644 --- a/Makefile +++ b/Makefile @@ -67,6 +67,10 @@ docker-build: docker-push: make -C controllers/nginx all-push +.PHONE: release +release: + make -C controllers/nginx release + .PHONY: ginkgo ginkgo: go get github.com/onsi/ginkgo/ginkgo diff --git a/controllers/nginx/Makefile b/controllers/nginx/Makefile index b9609ea3e..47fa9556f 100644 --- a/controllers/nginx/Makefile +++ b/controllers/nginx/Makefile @@ -88,13 +88,13 @@ ifeq ($(ARCH), amd64) endif push: .push-$(ARCH) -.push-$(ARCH): .container-$(ARCH) +.push-$(ARCH): $(DOCKER) push $(MULTI_ARCH_IMG):$(TAG) ifeq ($(ARCH), amd64) $(DOCKER) push $(IMAGE):$(TAG) endif -clean: +clean: $(DOCKER) rmi -f $(MULTI_ARCH_IMG):$(TAG) || true build: clean @@ -123,3 +123,6 @@ cover: vet: @echo "+ $@" @go vet $(shell go list ${PKG}/... | grep -v vendor) + +release: all-container all-push + echo "done"