Creates qchat.tar.gz and qchat.zip archives under `BUILD_DIR`.
(chat_path: pathlib.Path, signer: GpgSigner | None)
| 505 | |
| 506 | |
| 507 | def build_linux(chat_path: pathlib.Path, signer: GpgSigner | None): |
| 508 | """ |
| 509 | Creates qchat.tar.gz and qchat.zip archives under `BUILD_DIR`. |
| 510 | """ |
| 511 | chat_dst = BUILD_DIR / CHAT_BINARY_NAME |
| 512 | chat_dst.unlink(missing_ok=True) |
| 513 | shutil.copy2(chat_path, chat_dst) |
| 514 | |
| 515 | tar_gz_path = BUILD_DIR / f"{CHAT_BINARY_NAME}.tar.gz" |
| 516 | tar_gz_path.unlink(missing_ok=True) |
| 517 | info(f"Creating tar output to {tar_gz_path}") |
| 518 | run_cmd(["tar", "-czf", tar_gz_path, "-C", BUILD_DIR, chat_dst.name], cwd=BUILD_DIR) |
| 519 | generate_sha(tar_gz_path) |
| 520 | if signer: |
| 521 | signer.sign_file(tar_gz_path) |
| 522 | |
| 523 | zip_path = BUILD_DIR / f"{CHAT_BINARY_NAME}.zip" |
| 524 | zip_path.unlink(missing_ok=True) |
| 525 | info(f"Creating zip output to {zip_path}") |
| 526 | run_cmd(["zip", "-j", zip_path, chat_dst], cwd=BUILD_DIR) |
| 527 | generate_sha(zip_path) |
| 528 | if signer: |
| 529 | signer.sign_file(zip_path) |
| 530 | |
| 531 | # clean up |
| 532 | if signer: |
| 533 | signer.clean() |
| 534 | |
| 535 | |
| 536 | def build( |