MCPcopy Index your code
hub / github.com/aws/amazon-q-developer-cli / build_linux

Function build_linux

scripts/build.py:507–533  ·  view source on GitHub ↗

Creates qchat.tar.gz and qchat.zip archives under `BUILD_DIR`.

(chat_path: pathlib.Path, signer: GpgSigner | None)

Source from the content-addressed store, hash-verified

505
506
507def 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
536def build(

Callers 1

buildFunction · 0.85

Calls 5

infoFunction · 0.90
run_cmdFunction · 0.90
generate_shaFunction · 0.85
sign_fileMethod · 0.80
cleanMethod · 0.80

Tested by

no test coverage detected