osx: add support for keeping mpkgs stable
authorAugie Fackler <augie@google.com>
Mon, 18 Apr 2016 23:59:28 -0400
branchstable
changeset 29024 fe364d8797c3
parent 29023 e2a553ae1edc
child 29025 f2549b0ba9ab
osx: add support for keeping mpkgs This is a bit of a hack, but I don't really want to mount a dmg during a test, and I don't see an option with hdiutil to take a dmg and spit out a folder, so this is what we've got for now.
Makefile
--- a/Makefile	Mon Apr 18 23:57:22 2016 -0400
+++ b/Makefile	Mon Apr 18 23:59:28 2016 -0400
@@ -165,8 +165,9 @@
 	  mkdir -p $$OUTPUTDIR && \
 	  N=`cd dist && echo mercurial-*.mpkg | sed 's,\.mpkg$$,,'` && \
 	  hdiutil create -srcfolder dist/$$N.mpkg/ -scrub -volname "$$N" \
-	    -ov $$OUTPUTDIR/$$N.dmg
-	rm -rf dist/mercurial-*.mpkg
+	    -ov $$OUTPUTDIR/$$N.dmg && \
+	  [ -n "$$KEEPMPKG" ] && mv dist/mercurial-*.mpkg $$OUTPUTDIR || \
+	  rm -rf dist/mercurial-*.mpkg
 
 deb:
 	contrib/builddeb