grahampugh-recipes
grahampugh-recipes copied to clipboard
Add JamfPatchTitleVersioner processor and ReadMe
The purpose of this processor is to return the latest version number of a particular Patch Management software title. My primary use case:
- App is included in Patch Management titles.
- Vendor hides download link behind a login wall but the eventual download link does not require authentication.
- The download link is formatted in a predictable fashion and includes the version number.
The question becomes: how do you determine the version number so that you can insert it into your download link? The traditional method would be to use URLTextSearcher on a Release Notes page and scrape the version from there. The advantages of JamfPatchTitleVersioner are that the version number is already parsed (no regex voodoo required) and that you avoid the "AutoPkg knows about the new version but Patch Management hasn't approved it yet" issue.
A matching Read Me file has been included for completeness. The processor has not been run through a linter or any of the other coding standards typical in AutoPkg. I essentially took JamfPatchUploader and stripped out any non-relevant code, having the main function return a version number instead of its previous functions. I am open to edits. I did not include a "jamfpatchtitleversioner_results" section, since it didn't seem relevant (and similar processors, like Versioner do not include it).
Of course, my main use case got negated shortly after I pushed this, so feel free to reject if you don't see a significant use for it.
Hi Anthony, I was trying to get my head around the use case. I wondered if it could be useful in circumstances where multiple versions of an app are available for download from a vendor's website, but you want to ensure that the one that is "latest" in a patch definition is the one that you download rather than the actual latest.
That would prevent the download of a newer version when the patch definition is not yet up to date, which is a problem I've often thought could occur when mixing AutoPkg and Patch, especially when relying on Jamf's definitions (since you could theory update your own definition with a new AutoPkg processor).
I'm interested in what your actual use case was though (which app).
Ableton Live was the primary one. I eventually figured out that my recipe broke because they changed the download string when they started offering Universal installers. Fixing that meant my URLTextSearcher regex worked again. I think there is another title that I might have the same problem with, but I haven't got to it yet in my great "Convert to JamfUploader" project.