diff --git a/Makefile b/Makefile index 7af0728c..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 @@ -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`