[Request] [+ ] D8476: packaging: move version derivation to run_wix_packaging()
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Apr 22 02:39:37 UTC 2020
indygreg created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REVISION SUMMARY
With the previous commit moving signing inline, we no
longer need to compute the version string in build_installer()
and can instead move this logic to run_wix_packaging(). This
makes the logic in build_installer() simpler, which makes it
easier to implement alternate building mechanisms.
REPOSITORY
rHG Mercurial
BRANCH
stable
REVISION DETAIL
https://phab.mercurial-scm.org/D8476
AFFECTED FILES
contrib/packaging/hgpackaging/wix.py
CHANGE DETAILS
diff --git a/contrib/packaging/hgpackaging/wix.py b/contrib/packaging/hgpackaging/wix.py
--- a/contrib/packaging/hgpackaging/wix.py
+++ b/contrib/packaging/hgpackaging/wix.py
@@ -327,12 +327,6 @@
extra_packages_script=extra_packages_script,
)
- orig_version = version or find_version(source_dir)
- version = normalize_windows_version(orig_version)
- print('using version string: %s' % version)
- if version != orig_version:
- print('(normalized from: %s)' % orig_version)
-
build_dir = hg_build_dir / ('wix-%s' % arch)
staging_dir = build_dir / 'stage'
@@ -361,7 +355,6 @@
staging_dir,
arch,
version=version,
- orig_version=orig_version,
msi_name=msi_name,
extra_wxs=extra_wxs,
extra_features=extra_features,
@@ -375,7 +368,6 @@
staging_dir: pathlib.Path,
arch: str,
version: str,
- orig_version: str,
msi_name: typing.Optional[str] = "mercurial",
extra_wxs: typing.Optional[typing.Dict[str, str]] = None,
extra_features: typing.Optional[typing.List[str]] = None,
@@ -389,6 +381,13 @@
we will sign both the hg.exe and the .msi using the signing credentials
specified.
"""
+
+ orig_version = version or find_version(source_dir)
+ version = normalize_windows_version(orig_version)
+ print('using version string: %s' % version)
+ if version != orig_version:
+ print('(normalized from: %s)' % orig_version)
+
if signing_info:
sign_with_signtool(
staging_dir / "hg.exe",
To: indygreg, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20200422/bda9e467/attachment.html>
More information about the Mercurial-patches
mailing list