[PATCH 3 of 5 stable osx-packaging v2] osx: add support for keeping mpkgs

Augie Fackler raf at durin42.com
Wed Apr 27 11:45:53 EDT 2016


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1461038368 14400
#      Mon Apr 18 23:59:28 2016 -0400
# Branch stable
# Node ID c027697e877fa6ea43a46356beb0075753cda98b
# Parent  ced65aad425150aa6d012cae692fcc1ae20f0ddc
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.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -164,7 +164,7 @@ osx:
 	OUTPUTDIR=$${OUTPUTDIR:=packages/osx}
 	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
+	[ -n "$$KEEPMPKG" ] && mv dist/mercurial-*.mpkg $$OUTPUTDIR || rm -rf dist/mercurial-*.mpkg
 
 deb:
 	contrib/builddeb


More information about the Mercurial-devel mailing list