grahampugh / jamf-upload

Scripts for uploading packages to Jamf Cloud
Apache License 2.0
150 stars 39 forks source link

Feature request: Alternative version string input for JamfPatchUploader #108

Open AllPurposeBen opened 1 year ago

AllPurposeBen commented 1 year ago

I think what I need is JamfPatchUploader to have an optional input for an alternative version string to match against the string Jamf has for the definition of any give pkg version.

The issue I'm looking to solve: The Jamf patch entry for Zoom is looking for version numbers like 5.14.10 (19202), which is ugly but none the less what they have.

The zoom autopkg recipe I found formats in a sane way: 5.14.10.19202

If I try to use JamfPatchUploader to add the pkg to the patch definition, the mismatch returns this error: Error in local.jamf-patch.Zoom: Processor: com.github.grahampugh.jamf-upload.processors/JamfPatchUploader: Error: ERROR: Could not find matching version '5.14.10.19202' in patch softwaretitle 'Zoom'. Latest reported version is '5.14.10 (19202)'.

The zoom recipe does grab the version string from the Info.plist that matches what Jamf has but doesn't use it and I'm not sure I see a way to get an override to use that correctly and regardless, the only place it's goofy is where Jamf defines the version string.

So....if JamfPatchUploader had an optional input for version string that it uses to match what Jamf has for the version instead of the regular %VERSION% variable that's passed from further up the chain, that would allow a match.

Please forgive me if I'm missing an obvious existing solution for this. Thanks!

grahampugh commented 1 year ago

In those circumstances I would do one of the following:

  1. Write to whoever maintains the Zoom recipe and ask them if they would be willing to add an input key that allows you to choose between the versions in Info.plist. There are a few other recipes like this already.

  2. Write the above recipe myself.

Either way, I don't think it's something that should need to be built into JamfPatchUploader.