Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JamfPatchTitleVersioner processor and ReadMe #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jazzace
Copy link
Member

@jazzace jazzace commented May 18, 2022

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).

@jazzace
Copy link
Member Author

jazzace commented May 19, 2022

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.

@grahampugh
Copy link
Collaborator

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).

@jazzace
Copy link
Member Author

jazzace commented May 19, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants