From c4980630a162ab7686c40c7c1596abcca3603282 Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Tue, 18 Nov 2014 12:37:28 +0000 Subject: [PATCH 1/2] Added 'make tests' target to makefile and call it before 'make publish' --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 7af0728c..5b5c64a2 100644 --- a/Makefile +++ b/Makefile @@ -35,7 +35,11 @@ $(WEAVEDNS_EXPORT): weavedns/Dockerfile $(WEAVEDNS_EXE) $(SUDO) docker build -t $(WEAVEDNS_IMAGE) weavedns $(SUDO) docker save $(WEAVEDNS_IMAGE):latest > $@ -publish: $(WEAVER_EXPORT) +# Add more directories in here as more tests are created +tests: + cd nameserver; go test + +publish: $(WEAVER_EXPORT) tests $(SUDO) docker tag $(WEAVER_IMAGE) $(WEAVER_IMAGE):git-`git rev-parse --short=12 HEAD` $(SUDO) docker push $(WEAVER_IMAGE):latest $(SUDO) docker push $(WEAVER_IMAGE):git-`git rev-parse --short=12 HEAD` From a5acb5cdd3d3ef66620162686cf6a136466a213b Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Wed, 19 Nov 2014 16:34:39 +0000 Subject: [PATCH 2/2] Added tests to .PHONY rule --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5b5c64a2..34b579fd 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ .DEFAULT: all -.PHONY: all publish clean +.PHONY: all publish clean tests # If you can use docker without being root, you can do "make SUDO=" SUDO=sudo