[PATCH] osx: stamp the hg version into the version field in the pkg

Augie Fackler raf at durin42.com
Fri Aug 12 21:52:26 UTC 2016


# HG changeset patch
# User Augie Fackler <augie at google.com>
# Date 1471038708 14400
#      Fri Aug 12 17:51:48 2016 -0400
# Node ID 43a4c2b71bd23dc603345bf34dced201ff4df1d8
# Parent  f2241c13d5a1100f44278496fe58c05d364b97f8
osx: stamp the hg version into the version field in the pkg

This is required for tools like https://github.com/munki/munki, and is
also more semantically correct.

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -164,10 +164,12 @@ osx:
 	  --install-lib=/Library/Python/2.7/site-packages/
 	make -C doc all install DESTDIR="$(PWD)/build/mercurial/"
 	mkdir -p $${OUTPUTDIR:-dist}
-	pkgbuild --root build/mercurial/ --identifier org.mercurial-scm.mercurial \
-	  build/mercurial.pkg
 	HGVER=$$((cat build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py; echo 'print(version)') | python) && \
 	OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
+	pkgbuild --root build/mercurial/ \
+	  --identifier org.mercurial-scm.mercurial \
+	  --version "$${HGVER}"
+	  build/mercurial.pkg && \
 	productbuild --distribution contrib/macosx/distribution.xml \
 	  --package-path build/ \
 	  --version "$${HGVER}" \


More information about the Mercurial-devel mailing list