Skip to content

Commit

Permalink
Add latest macOS build numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
np5 committed Nov 20, 2024
1 parent eb42f1e commit 5635855
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
5 changes: 5 additions & 0 deletions tests/inventory/test_macos_build_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ def test_ok(self):
("22G513", ("macOS", 13, 6, 4, None), "macOS 13.6.4 (22G513)"),
("22G621", ("macOS", 13, 6, 5, None), "macOS 13.6.5 (22G621)"),
("22G820", ("macOS", 13, 6, 8, None), "macOS 13.6.8 (22G820)"),
("22G830", ("macOS", 13, 6, 9, None), "macOS 13.6.9 (22G830)"),
("22H123", ("macOS", 13, 7, 0, None), "macOS 13.7 (22H123)"),
("22H221", ("macOS", 13, 7, 1, None), "macOS 13.7.1 (22H221)"),
("23A344", ("macOS", 14, 0, 0, None), "macOS 14.0 (23A344)"),
("23B5056e", ("macOS", 14, 1, 0, None), "macOS 14.1 (23B5056e)"),
("23B81", ("macOS", 14, 1, 1, None), "macOS 14.1.1 (23B81)"),
Expand All @@ -105,8 +108,10 @@ def test_ok(self):
("23E214", ("macOS", 14, 4, 0, None), "macOS 14.4 (23E214)"),
("23G93", ("macOS", 14, 6, 1, None), "macOS 14.6.1 (23G93)"),
("23H124", ("macOS", 14, 7, 0, None), "macOS 14.7 (23H124)"),
("23H222", ("macOS", 14, 7, 1, None), "macOS 14.7.1 (23H222)"),
("24A335", ("macOS", 15, 0, 0, None), "macOS 15.0 (24A335)"),
("24A348", ("macOS", 15, 0, 1, None), "macOS 15.0.1 (24A348)"),
("24B91", ("macOS", 15, 1, 1, None), "macOS 15.1.1 (24B91)"),
):
expected_version_d = {
"name": name,
Expand Down
12 changes: 6 additions & 6 deletions zentral/contrib/inventory/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,9 +246,9 @@ def macos_version_from_build(build):
minor = patch
if build in ("21A558", "21A559", "21D62", "21E258", "21G83", "21G217", "21G920",
"22A400", "22D68", "22E261", "22E772610a", "22F82", "22F770820b", "22F770820d",
"22G90", "22G313",
"23B81", "23B2082", "23C71", "23D60", "23G93",
"24A348"):
"22G90", "22G313", "22H221",
"23B81", "23B2082", "23C71", "23D60", "23G93", "23H222",
"24A348", "24B91"):
patch = 1
elif build in ("21G309", "21G320", "21G1974",
"22G91", "22G320",
Expand All @@ -266,15 +266,15 @@ def macos_version_from_build(build):
patch = 7
elif build in ("21G725", "22G820"):
patch = 8
elif build == "21G726":
elif build in ("21G726", "22G830"):
patch = 9
else:
patch = 0
if patch_letter >= "G" and major == 12 and patch_number >= 816:
minor = 7
elif patch_letter >= "G" and major in (12, 13) and patch_number >= 115:
elif patch_letter == "G" and major in (12, 13) and patch_number >= 115:
minor = 6
elif minor > 0 and major < 14:
elif patch_letter < "H" and minor > 0 and major < 14:
minor -= 1
elif minor == 16:
major = 11
Expand Down

0 comments on commit 5635855

Please sign in to comment.