From 5d8b64be0cfc9f5776e79f032baed9dd96a66790 Mon Sep 17 00:00:00 2001 From: Matt Robenolt Date: Fri, 3 Jun 2016 14:51:55 -0700 Subject: [PATCH] Support overriding vars in Makefile --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 720a40d..3c98cbf 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -REPOSITORY=sentry-onpremise -TAG=latest +REPOSITORY?=sentry-onpremise +TAG?=latest OK_COLOR=\033[32;01m NO_COLOR=\033[0m @@ -12,6 +12,10 @@ $(REPOSITORY)_$(TAG).tar: build @echo "$(OK_COLOR)==>$(NO_COLOR) Saving $(REPOSITORY):$(TAG) > $@" @docker save $(REPOSITORY):$(TAG) > $@ +push: + @echo "$(OK_COLOR)==>$(NO_COLOR) Pushing $(REPOSITORY):$(TAG)" + @docker push $(REPOSITORY):$(TAG) + all: build $(REPOSITORY)_$(TAG).tar -.PHONY: build all +.PHONY: all build push