From a61d5e13f6b70601e365557f08563879320f5427 Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Wed, 11 Nov 2020 09:16:14 +0000 Subject: [PATCH] Populate errorlevel from the top level Makefile (#69) --- .gitignore | 1 + Makefile | 26 ++++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 6824cff3..8ce2fb22 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ .vagrant _obj Dockerfile +.status.* \ No newline at end of file diff --git a/Makefile b/Makefile index a45ea9da..b5492b89 100644 --- a/Makefile +++ b/Makefile @@ -1,20 +1,26 @@ TARGETS=go1.10 go1.11 go1.12 go1.13 go1.14 +build: status=".status.build" build: + @echo '0' > ${status} @$(foreach var,$(TARGETS), \ - $(MAKE) -C $(var) $@; \ - $(MAKE) -C $(var) -f Makefile.debian7 $@; \ - $(MAKE) -C $(var) -f Makefile.debian8 $@; \ - $(MAKE) -C $(var) -f Makefile.debian9 $@;) - @make -C fpm $@ + $(MAKE) -C $(var) $@ || echo '1' > ${status}; \ + $(MAKE) -C $(var) -f Makefile.debian7 $@ || echo '1' > ${status}; \ + $(MAKE) -C $(var) -f Makefile.debian8 $@ || echo '1' > ${status}; \ + $(MAKE) -C $(var) -f Makefile.debian9 $@ || echo '1' > ${status};) + @make -C fpm $@ || echo '1' > ${status} + exit $$(cat ${status}) # Requires login at https://docker.elastic.co:7000/. +push: status=".status.push" push: + @echo '0' > ${status} @$(foreach var,$(TARGETS), \ - $(MAKE) -C $(var) $@; \ - $(MAKE) -C $(var) -f Makefile.debian7 $@; \ - $(MAKE) -C $(var) -f Makefile.debian8 $@; \ - $(MAKE) -C $(var) -f Makefile.debian9 $@;) - @make -C fpm $@ + $(MAKE) -C $(var) $@ || echo '1' > ${status}; \ + $(MAKE) -C $(var) -f Makefile.debian7 $@ || echo '1' > ${status}; \ + $(MAKE) -C $(var) -f Makefile.debian8 $@ || echo '1' > ${status}; \ + $(MAKE) -C $(var) -f Makefile.debian9 $@ || echo '1' > ${status};) + @make -C fpm $@ || echo '1' > ${status} + exit $$(cat ${status}) .PHONY: build push