|
@@ -374,10 +374,6 @@ def build_firmware_package(
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
report_commit = td_report.get("commit_full") or td_report.get("commit")
|
|
report_commit = td_report.get("commit_full") or td_report.get("commit")
|
|
|
- if report_commit and report_commit != artifact_commit:
|
|
|
|
|
- raise PackagingError(
|
|
|
|
|
- f"TD report commit {report_commit} does not match artifact_source_commit {artifact_commit}"
|
|
|
|
|
- )
|
|
|
|
|
|
|
|
|
|
report_project_sha = td_report.get("project_config_sha256")
|
|
report_project_sha = td_report.get("project_config_sha256")
|
|
|
current_project_sha = _sha256_file(ROOT / "projects" / "prod2u-door-temp" / "project.json")
|
|
current_project_sha = _sha256_file(ROOT / "projects" / "prod2u-door-temp" / "project.json")
|
|
@@ -406,6 +402,17 @@ def build_firmware_package(
|
|
|
f"source_closure_unchanged requested but comparison differs: {comparison['production_changed_paths']}"
|
|
f"source_closure_unchanged requested but comparison differs: {comparison['production_changed_paths']}"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
|
|
+ # ARTIFACT-SOURCE identifies the production-input tip. TD may execute on a later
|
|
|
|
|
+ # delivery tip when SOURCE-CLOSURE-UNCHANGED proves those inputs are identical.
|
|
|
|
|
+ if report_commit and report_commit != artifact_commit:
|
|
|
|
|
+ if not (
|
|
|
|
|
+ source_closure_unchanged and comparison.get("source_closure_equal") is True
|
|
|
|
|
+ ):
|
|
|
|
|
+ raise PackagingError(
|
|
|
|
|
+ f"TD report commit {report_commit} does not match artifact_source_commit "
|
|
|
|
|
+ f"{artifact_commit} and source closure is not proven unchanged"
|
|
|
|
|
+ )
|
|
|
|
|
+
|
|
|
comparison_json = json.dumps(comparison, indent=2, sort_keys=True) + "\n"
|
|
comparison_json = json.dumps(comparison, indent=2, sort_keys=True) + "\n"
|
|
|
comparison_sha256 = _sha256_bytes(comparison_json.encode("utf-8"))
|
|
comparison_sha256 = _sha256_bytes(comparison_json.encode("utf-8"))
|
|
|
|
|
|