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
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to