Skip to content

Commit

Permalink
Get build numbers from updates as well
Browse files Browse the repository at this point in the history
  • Loading branch information
corpnewt authored Jun 12, 2019
1 parent 52d03d4 commit 5bfe705
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions gibMacOS.command
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,14 @@ class gibMacOS:
except:
dist_file = ""
pass
build_search = "macOSProductBuildVersion" if "macOSProductBuildVersion" in dist_file else "BUILD"
vers_search = "macOSProductVersion" if "macOSProductVersion" in dist_file else "VERSION"
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:
pass
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:
pass
return (build,version)
Expand Down

0 comments on commit 5bfe705

Please sign in to comment.