autopkg / hjuutilainen-recipes

Recipes for AutoPkg
MIT License
49 stars 74 forks source link

Add the ability to have a preferred major version #265

Closed kbrewersq closed 11 months ago

kbrewersq commented 11 months ago

We have been using the Elastic search recipe: hjuutilainen-recipes for filebeat oss, and once again elastic filebeat has released an update of 8.8.2, then a back port of 7.17.11 but the URLTextSearcher was finding the 7.17.11 version instead of the newer one 8.8.2 version because its choosing the first regex match that it finds. By adding a preferred major version variable I can choose between major version 8 or 7 if I want to grab the correct one for my needs. With an empty string (default) it will behave as it does now and find the last one published that meets the regex

elastic_feedback_majorempty.txt elastic_feedback_withmajor.txt

hjuutilainen commented 11 months ago

Thank you for the PR!