Skip to content

Commit b2f0503

Browse files
committed
Merge in compile changes from dev so we can setup auto build and release
1 parent c027fac commit b2f0503

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

compile.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ def main() -> int:
297297
# Wait for the process to finish and get the return code.
298298
return_code = process.wait()
299299
if platform.system() == 'Darwin':
300-
certificate_name = os.getenv("CODE_SIGNING_CERTIFICATE", "")
300+
certificate_name = os.getenv("CODE_SIGNING_CERTIFICATE", "") or os.getenv("APPLE_SIGN_IDENTITY", "")
301301
if certificate_name:
302302
return_code = osx_sign_app_and_build_dmg(
303303
app_name, certificate_name, version)
@@ -307,6 +307,12 @@ def main() -> int:
307307
if platform.system() == 'Windows':
308308
return_code = build_windows_installer([], version, icon_file_path)
309309

310+
if platform.system() == 'Linux':
311+
current_script_directory = get_current_folder()
312+
distribution_folder = os.path.join(current_script_directory, "dist", "OpenVPCal")
313+
zip_file_name = os.path.join(current_script_directory, "Output", f"OpenVPCal-{version}-Ubuntu-x86_64.zip")
314+
shutil.make_archive(zip_file_name.replace('.zip', ''), 'zip', distribution_folder)
315+
310316
print('Return code:', return_code)
311317
return return_code
312318

@@ -323,8 +329,8 @@ def build_windows_installer(manual_paths, version, icon_path) -> int:
323329
324330
"""
325331
current_script_directory = get_current_folder()
332+
distribution_folder = os.path.join(current_script_directory, "dist", "OpenVPCal")
326333
for manual_path in manual_paths:
327-
distribution_folder = os.path.join(current_script_directory, "dist", "OpenVPCal")
328334
target_file = os.path.join(
329335
distribution_folder,
330336
os.path.basename(manual_path)
@@ -339,6 +345,10 @@ def build_windows_installer(manual_paths, version, icon_path) -> int:
339345
iss_file_name,
340346
iss_vars
341347
)
348+
349+
# make a zip file of the distribution_folder called OpenVPCal-{version}-x86.zip
350+
zip_file_name = os.path.join(current_script_directory, "Output", f"OpenVPCal-{version}-Windows-x86_64.zip")
351+
shutil.make_archive(zip_file_name.replace('.zip', ''), 'zip', distribution_folder)
342352
return return_code
343353

344354
def remove_ds_store(root_dir):

0 commit comments

Comments
 (0)