Release: use independent component repositories
Container CI / release-build (push) Successful in 16m22s
Nightly release / publish-nightly (push) Successful in 16m6s

This commit is contained in:
faumaray committed 2026-07-28 21:24:30 +03:00
1 parent 8c69efc56f
commit f78004e822
26 files changed
+571 -49

No files matched your search

+25 -7
View File
@@ -320,7 +320,9 @@ def atomic_write(path: Path, content: bytes, mode: int = 0o644) -> None:
def main() -> None:
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--new-payload", type=Path, required=True)
parser.add_argument(
"--new-payload", type=Path, action="append", required=True
)
parser.add_argument("--existing-envelope", type=Path)
parser.add_argument("--public-key", type=Path, required=True)
parser.add_argument("--private-key", type=Path, required=True)
@@ -346,7 +348,9 @@ def main() -> None:
fail("--valid-days must be between 1 and 365")
if arguments.nightly_retention < 1:
fail("--nightly-retention must be positive")
new_payload_path = regular_file(arguments.new_payload, "new payload")
new_payload_paths = [
regular_file(path, "new payload") for path in arguments.new_payload
]
public_key = regular_file(arguments.public_key, "Ed25519 public key")
private_key = regular_file(
arguments.private_key, "Ed25519 private key", private=True
@@ -368,8 +372,17 @@ def main() -> None:
if previous is not None and previous != key_path:
fail(f"conflicting public keys for key id: {key_id}")
trusted_existing_keys[key_id] = key_path
new_document = load_json_bytes(new_payload_path.read_bytes(), "new feed payload")
new_releases = validate_payload(new_document, "new feed payload")
new_documents = [
load_json_bytes(path.read_bytes(), "new feed payload")
for path in new_payload_paths
]
new_document = new_documents[0]
new_releases: list[dict[str, Any]] = []
for document in new_documents:
releases = validate_payload(document, "new feed payload")
if document["feedId"] != new_document["feedId"]:
fail("new feed identifiers differ")
new_releases.extend(releases)
existing_document: dict[str, Any] | None = None
existing_payload_bytes = b""
@@ -389,7 +402,7 @@ def main() -> None:
output_payload = arguments.output_payload.resolve()
output_envelope = arguments.output_envelope.resolve()
inputs = {
new_payload_path,
*new_payload_paths,
private_key,
*trusted_existing_keys.values(),
}
@@ -422,7 +435,10 @@ def main() -> None:
)
generated = max(
generated,
parse_timestamp(new_document["generatedAt"], "new feed generatedAt"),
max(
parse_timestamp(document["generatedAt"], "new feed generatedAt")
for document in new_documents
),
)
if existing_document is not None:
generated = max(
@@ -431,7 +447,9 @@ def main() -> None:
existing_document["generatedAt"], "existing feed generatedAt"
),
)
minimum_sequence = int(new_document["sequence"])
minimum_sequence = max(
int(document["sequence"]) for document in new_documents
)
if existing_document is not None:
minimum_sequence = max(minimum_sequence, int(existing_document["sequence"]) + 1)
sequence = arguments.sequence