automation: add --version argument to build-all-windows-packages
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 19 Apr 2019 09:18:23 -0700
changeset 42310 d137a3d5ad41
parent 42309 5c242c427897
child 42311 195dcc10b3d7
automation: add --version argument to build-all-windows-packages This lets us pass a version string through when building all Windows packages, just like we can do with the individual commands which produce installers. Differential Revision: https://phab.mercurial-scm.org/D6317
contrib/automation/hgautomation/cli.py
--- a/contrib/automation/hgautomation/cli.py	Fri Apr 19 08:32:24 2019 -0700
+++ b/contrib/automation/hgautomation/cli.py	Fri Apr 19 09:18:23 2019 -0700
@@ -73,7 +73,8 @@
             windows.build_wheel(instance.winrm_client, a, DIST_PATH)
 
 
-def build_all_windows_packages(hga: HGAutomation, aws_region, revision):
+def build_all_windows_packages(hga: HGAutomation, aws_region, revision,
+                               version):
     c = hga.aws_connection(aws_region)
     image = aws.ensure_windows_dev_ami(c)
     DIST_PATH.mkdir(exist_ok=True)
@@ -89,9 +90,11 @@
             windows.purge_hg(winrm_client)
             windows.build_wheel(winrm_client, arch, DIST_PATH)
             windows.purge_hg(winrm_client)
-            windows.build_inno_installer(winrm_client, arch, DIST_PATH)
+            windows.build_inno_installer(winrm_client, arch, DIST_PATH,
+                                         version=version)
             windows.purge_hg(winrm_client)
-            windows.build_wix_installer(winrm_client, arch, DIST_PATH)
+            windows.build_wix_installer(winrm_client, arch, DIST_PATH,
+                                        version=version)
 
 
 def terminate_ec2_instances(hga: HGAutomation, aws_region):
@@ -149,6 +152,10 @@
         help='Mercurial revision to build',
         default='.',
     )
+    sp.add_argument(
+        '--version',
+        help='Mercurial version string to use',
+    )
     sp.set_defaults(func=build_all_windows_packages)
 
     sp = subparsers.add_parser(