Patchwork [STABLE] osx: delay version computation on macOS builds

login
register
mail settings
Submitter Kevin Bullock
Date Aug. 11, 2017, 1:25 a.m.
Message ID <0d3a872cbb37b7845eac.1502414733@ingalls.local>
Download mbox | patch
Permalink /patch/22839/
State Accepted
Headers show

Comments

Kevin Bullock - Aug. 11, 2017, 1:25 a.m.
# HG changeset patch
# User Kevin Bullock <kbullock+mercurial@ringworld.org>
# Date 1502414702 14400
#      Thu Aug 10 21:25:02 2017 -0400
# Branch stable
# Node ID 0d3a872cbb37b7845eacdcaa578c0048e3f4873f
# Parent  a3ce07e2dde5737644dd719806b1e52fb1cc1004
osx: delay version computation on macOS builds

Before this patch, HGVER would be evaluated at the beginning of the make
execution, and would be unset because build/mercurial/ doesn't exist yet
at that point. Now we compute the version after the `make install` run
has completed.

This is backported to stable from 8626b44516c1, but that revision had an
error in the shell invocation syntax.
Yuya Nishihara - Aug. 13, 2017, 2:24 a.m.
On Thu, 10 Aug 2017 21:25:33 -0400, Kevin Bullock wrote:
> # HG changeset patch
> # User Kevin Bullock <kbullock+mercurial@ringworld.org>
> # Date 1502414702 14400
> #      Thu Aug 10 21:25:02 2017 -0400
> # Branch stable
> # Node ID 0d3a872cbb37b7845eacdcaa578c0048e3f4873f
> # Parent  a3ce07e2dde5737644dd719806b1e52fb1cc1004
> osx: delay version computation on macOS builds

Queued for stable, thanks.

Patch

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -186,7 +186,7 @@  osx:
 	  PREFIX=/usr/local \
 	  clean install
 	mkdir -p $${OUTPUTDIR:-dist}
-	HGVER=$(shell python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py ) && \
+	HGVER=$$(python contrib/genosxversion.py $(OSXVERSIONFLAGS) build/mercurial/Library/Python/2.7/site-packages/mercurial/__version__.py) && \
 	OSXVER=$$(sw_vers -productVersion | cut -d. -f1,2) && \
 	pkgbuild --filter \\.DS_Store --root build/mercurial/ \
 	  --identifier org.mercurial-scm.mercurial \