mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2025-01-22 10:04:12 -05:00
Get build numbers from updates as well
This commit is contained in:
parent
52d03d4be1
commit
5bfe705971
1 changed files with 4 additions and 2 deletions
|
@ -154,12 +154,14 @@ class gibMacOS:
|
||||||
except:
|
except:
|
||||||
dist_file = ""
|
dist_file = ""
|
||||||
pass
|
pass
|
||||||
|
build_search = "macOSProductBuildVersion" if "macOSProductBuildVersion" in dist_file else "BUILD"
|
||||||
|
vers_search = "macOSProductVersion" if "macOSProductVersion" in dist_file else "VERSION"
|
||||||
try:
|
try:
|
||||||
build = dist_file.split("<key>BUILD</key>")[1].split("<string>")[1].split("</string>")[0]
|
build = dist_file.split("<key>{}</key>".format(build_search))[1].split("<string>")[1].split("</string>")[0]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
try:
|
try:
|
||||||
version = dist_file.split("<key>VERSION</key>")[1].split("<string>")[1].split("</string>")[0]
|
version = dist_file.split("<key>{}</key>".format(vers_search))[1].split("<string>")[1].split("</string>")[0]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
return (build,version)
|
return (build,version)
|
||||||
|
|
Loading…
Reference in a new issue