autopkg / dataJAR-recipes

Elegant and powerful Apple services for business and education.
https://www.datajar.co.uk
Apache License 2.0
113 stars 80 forks source link

Rancher Desktop download recipe not catching latest version due to 2 digit minor version #305

Closed fseesink closed 11 months ago

fseesink commented 11 months ago

First, as always, thanks for providing these recipes. Always appreciate when someone does this as it helps save a lot of time.

Now regarding the issue I recently noticed, Rancher Desktop released v1.10.0 three (3) weeks ago. But to date the Rancher Desktop download recipe still only pulls down 1.9.1.

I believe the issue has to do with the RegEx used on this line in the recipe:

<string>Rancher\.Desktop-(\d(\.\d)+)\.%ARCH_TYPE%\.dmg</string>

This RegEx limits things to semantic versions where the MAJOR, MINOR, and PATCH versions are only allowed to be a single digit each.

The correct RegEx for this would be

<string>Rancher\.Desktop-(\d+(\.\d+)+)\.%ARCH_TYPE%\.dmg</string>

(note the addition of a '+' to each digit (\d) to signify "one or more digits")

allowing multiple digits for each. This would catch versions such as 10.14.23, etc.

Anyway, thought I should mention this.

paul-cossey commented 11 months ago

Nice spot, thanks @fseesink

Can you give this https://github.com/autopkg/dataJAR-recipes/commit/b9161b71ac021bfaefc31e80590f9531f54efd73 commit a try, and let me know if it resolves it for you please?

Thanks!

fseesink commented 11 months ago

Yep. Works fine.

paul-cossey commented 11 months ago

Thanks, for confirming. I'll close this off