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

login
register
mail settings
Submitter Augie Fackler
Date April 27, 2016, 3:45 p.m.
Message ID <c027697e877fa6ea43a4.1461771953@augie-macbookair2.roam.corp.google.com>
Download mbox | patch
Permalink /patch/14803/
State Superseded
Commit fe364d8797c3a7a2311c05d49f26ec3c82970953
Headers show

Comments

Augie Fackler - April 27, 2016, 3:45 p.m.
# HG changeset patch
# User Augie Fackler <augie@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.

Patch

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