71 |
71 |
72 for a in arch: |
72 for a in arch: |
73 windows.build_wheel(instance.winrm_client, a, DIST_PATH) |
73 windows.build_wheel(instance.winrm_client, a, DIST_PATH) |
74 |
74 |
75 |
75 |
76 def build_all_windows_packages(hga: HGAutomation, aws_region, revision): |
76 def build_all_windows_packages(hga: HGAutomation, aws_region, revision, |
|
77 version): |
77 c = hga.aws_connection(aws_region) |
78 c = hga.aws_connection(aws_region) |
78 image = aws.ensure_windows_dev_ami(c) |
79 image = aws.ensure_windows_dev_ami(c) |
79 DIST_PATH.mkdir(exist_ok=True) |
80 DIST_PATH.mkdir(exist_ok=True) |
80 |
81 |
81 with aws.temporary_windows_dev_instances(c, image, 't3.medium') as insts: |
82 with aws.temporary_windows_dev_instances(c, image, 't3.medium') as insts: |
87 |
88 |
88 for arch in ('x86', 'x64'): |
89 for arch in ('x86', 'x64'): |
89 windows.purge_hg(winrm_client) |
90 windows.purge_hg(winrm_client) |
90 windows.build_wheel(winrm_client, arch, DIST_PATH) |
91 windows.build_wheel(winrm_client, arch, DIST_PATH) |
91 windows.purge_hg(winrm_client) |
92 windows.purge_hg(winrm_client) |
92 windows.build_inno_installer(winrm_client, arch, DIST_PATH) |
93 windows.build_inno_installer(winrm_client, arch, DIST_PATH, |
|
94 version=version) |
93 windows.purge_hg(winrm_client) |
95 windows.purge_hg(winrm_client) |
94 windows.build_wix_installer(winrm_client, arch, DIST_PATH) |
96 windows.build_wix_installer(winrm_client, arch, DIST_PATH, |
|
97 version=version) |
95 |
98 |
96 |
99 |
97 def terminate_ec2_instances(hga: HGAutomation, aws_region): |
100 def terminate_ec2_instances(hga: HGAutomation, aws_region): |
98 c = hga.aws_connection(aws_region, ensure_ec2_state=False) |
101 c = hga.aws_connection(aws_region, ensure_ec2_state=False) |
99 aws.terminate_ec2_instances(c.ec2resource) |
102 aws.terminate_ec2_instances(c.ec2resource) |
147 sp.add_argument( |
150 sp.add_argument( |
148 '--revision', |
151 '--revision', |
149 help='Mercurial revision to build', |
152 help='Mercurial revision to build', |
150 default='.', |
153 default='.', |
151 ) |
154 ) |
|
155 sp.add_argument( |
|
156 '--version', |
|
157 help='Mercurial version string to use', |
|
158 ) |
152 sp.set_defaults(func=build_all_windows_packages) |
159 sp.set_defaults(func=build_all_windows_packages) |
153 |
160 |
154 sp = subparsers.add_parser( |
161 sp = subparsers.add_parser( |
155 'build-inno', |
162 'build-inno', |
156 help='Build Inno Setup installer(s)', |
163 help='Build Inno Setup installer(s)', |