[PATCH 1/5] debian: return an error if debian snapshot build fails

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Dec 4 00:47:38 PST 2019


Signed-off-by: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
---
 Makefile.local | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index 7c12612d..586cdf75 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -97,14 +97,16 @@ pre-release:
 .PHONY: debian-snapshot
 debian-snapshot:
 	make VERSION=$(VERSION) clean
-	TMPFILE=$$(mktemp /tmp/notmuch.XXXXXX);		\
-	  cp debian/changelog $${TMPFILE};		\
-	  EDITOR=/bin/true dch -b -v $(VERSION)+1	\
-	    -D UNRELEASED 'test build, not for upload';	\
-	  echo '3.0 (native)' > debian/source/format; 	\
-	  debuild -us -uc;				\
-	  mv -f $${TMPFILE} debian/changelog;		\
-	  echo '3.0 (quilt)' > debian/source/format
+	RETVAL=0 &&						\
+	  TMPFILE=$$(mktemp /tmp/notmuch.XXXXXX) &&		\
+	  cp debian/changelog $${TMPFILE} &&			\
+	  (EDITOR=/bin/true dch -b -v $(VERSION)+1		\
+	    -D UNRELEASED 'test build, not for upload' &&	\
+	  echo '3.0 (native)' > debian/source/format &&		\
+	  debuild -us -uc); RETVAL=$$?				\
+	  mv -f $${TMPFILE} debian/changelog;			\
+	  echo '3.0 (quilt)' > debian/source/format;		\
+	  exit $$RETVAL
 
 .PHONY: release-message
 release-message:
-- 
2.24.0



More information about the notmuch mailing list