(
*,
release_tag: str,
release_dir: Path,
output: Path,
)
| 369 | |
| 370 | |
| 371 | def generate_homebrew_formula( |
| 372 | *, |
| 373 | release_tag: str, |
| 374 | release_dir: Path, |
| 375 | output: Path, |
| 376 | ) -> None: |
| 377 | checksums_path = release_dir / "openshell-checksums-sha256.txt" |
| 378 | gateway_checksums_path = release_dir / "openshell-gateway-checksums-sha256.txt" |
| 379 | checksums = _parse_sha256_file(checksums_path) |
| 380 | gateway_checksums = _parse_sha256_file(gateway_checksums_path) |
| 381 | |
| 382 | formula = render_homebrew_formula( |
| 383 | release_tag=release_tag, |
| 384 | cli_sha256=_required_checksum(checksums, HOMEBREW_CLI_ASSET, checksums_path), |
| 385 | gateway_sha256=_required_checksum( |
| 386 | gateway_checksums, |
| 387 | HOMEBREW_GATEWAY_ASSET, |
| 388 | gateway_checksums_path, |
| 389 | ), |
| 390 | driver_vm_sha256=_required_checksum( |
| 391 | checksums, |
| 392 | HOMEBREW_DRIVER_VM_ASSET, |
| 393 | checksums_path, |
| 394 | ), |
| 395 | ) |
| 396 | output.parent.mkdir(parents=True, exist_ok=True) |
| 397 | output.write_text(formula, encoding="utf-8") |
| 398 | |
| 399 | |
| 400 | def build_parser() -> argparse.ArgumentParser: |
no test coverage detected