Skip to content

Commit

Permalink
Fix: Bom-diff status codes.
Browse files Browse the repository at this point in the history
Signed-off-by: Caroline Russell <[email protected]>
  • Loading branch information
cerrussell committed Jul 31, 2024
1 parent 72b4c3e commit 4c32dce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions custom_json_diff/custom_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,12 +159,12 @@ def parse_purls(deps: List[Dict], regex: re.Pattern) -> List[Dict]:


def perform_bom_diff(bom_1: BomDicts, bom_2: BomDicts) -> Tuple[int, Dict]:
status_1, output = (bom_1.intersection(bom_2, "common_summary")).to_summary()
status_2, summary_1 = (bom_1 - bom_2).to_summary()
status_3, summary_2 = (bom_2 - bom_1).to_summary()
_, output = (bom_1.intersection(bom_2, "common_summary")).to_summary()
status_1, summary_1 = (bom_1 - bom_2).to_summary()
status_2, summary_2 = (bom_2 - bom_1).to_summary()
output["diff_summary"] = summary_1
output["diff_summary"] |= summary_2
return max(status_1, status_2, status_3), output
return max(status_1, status_2), output


def report_results(status: int, diffs: Dict, options: Options, j1: BomDicts | None = None, j2: BomDicts | None = None) -> None:
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "custom-json-diff"
version = "1.5.2"
version = "1.5.3"
description = "Custom JSON and CycloneDx BOM diffing and comparison tool."
authors = [
{ name = "Caroline Russell", email = "[email protected]" },
Expand Down

0 comments on commit 4c32dce

Please sign in to comment.