From f9567721aaa2bf1cb37d3e379cd4f3686767b333 Mon Sep 17 00:00:00 2001 From: Colin Cornaby Date: Sun, 14 Jul 2024 17:27:35 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Adam Johnson --- urumanifest/commit.py | 2 +- urumanifest/github.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/urumanifest/commit.py b/urumanifest/commit.py index dab72b3..8538a4f 100644 --- a/urumanifest/commit.py +++ b/urumanifest/commit.py @@ -63,7 +63,7 @@ def _hash_asset(args: Tuple[Path, Path, bool]) -> Tuple[Path, str, int]: bundle_name = source_path.stem # Guess the executable path - we could get the exact name if we could unpack the Info.plist # in a cross platform way. - source_path = source_path.joinpath("Contents", MacOS", bundle_name) + source_path = source_path.joinpath("Contents", MacOS", bundle_name) with source_path.open("rb") as in_stream: _io_loop(in_stream, h.update) return server_path, h.hexdigest(), source_path.stat().st_size diff --git a/urumanifest/github.py b/urumanifest/github.py index 48024cc..860087a 100644 --- a/urumanifest/github.py +++ b/urumanifest/github.py @@ -379,6 +379,7 @@ class ArtifactInfo(NamedTuple): name: str bundle: bool = False + def _unpack_artifact(staging_path: Path, database: _WorkflowDatabase, rev: str, name: str, artifact: tempfile.NamedTemporaryFile): logging.debug(f"Decompressing {name}.zip from {artifact.name}")