osx: stamp the hg version into the version field in the pkg
authorAugie Fackler <augie@google.com>
Fri, 12 Aug 2016 17:51:48 -0400
changeset 29777 afa74947a414
parent 29776 279cd80059d4
child 29778 594035c1adc7
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.
Makefile
--- a/Makefile	Thu Jul 28 14:18:01 2016 +0200
+++ b/Makefile	Fri Aug 12 17:51:48 2016 -0400
@@ -164,10 +164,12 @@
 	  --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}" \