Previously, combining '--head' and '--request GET' allowed curl to perform a
GET request and stop after receiving the headers. This workaround was added to
handle servers that return HTTP Forbidden or incorrect headers for a HEAD
request. However, with the update to curl 8.6.0 on macOS 14.5, this
combination results in an error ("curl: (8) Weird server reply").
* Redesign SparkleUpdateInfoProvider channel support
Follow up to #834
* Remove unneeded version instantiation
* Strip leading/trailing space from feed items' values
* Raise specific import errors
* Enable non-interactive script run
* Add note about processor docs generation
* Rebuild processor docs upon new tag creation
* Support using existing clone (for GH actions workflow)
Channels is a Sparkle v2 feature which allows for differing channels to be offered within AppCasts, such as a beta channel (see: https://sparkle-project.org/documentation/publishing/#publishing-an-update).
This PR adds a new input_variable to the SparkleUpdateInfoProvider processor, `update_channel`.
When a value for `update_channel` is specified, each channel/item block is searched for the sparkle:channel element. If this exists and has the same value as what has been passed to the `update_channel` input_variable, this channel/item block is used to get the needed data via the same method as before this PR.
If the channel/item block does not have a channel defined, or it's does and it's not the same value as what has been passed to the `update_channel` input_variable, the channel/item block is skipped.
If no value has been passed to the `update_channel` input_variable, then no change to behaviour from before.
Examples:
No value has passed to the `update_channel` input_variable:
```Processing /Users/ben/Git/other/dataJAR-recipes/Munki Catalog Browser/Munki Catalog Browser.download.recipe...
WARNING: /Users/ben/Git/other/dataJAR-recipes/Munki Catalog Browser/Munki Catalog Browser.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
SparkleUpdateInfoProvider
{'Input': {'appcast_url': 'https://raw.githubusercontent.com/dataJAR/Munki-Catalog-Browser/appcast/appcast.xml'}}
SparkleUpdateInfoProvider: Version retrieved from appcast: 70
SparkleUpdateInfoProvider: Found URL https://github.com/dataJAR/Munki-Catalog-Browser/releases/download/1.2.1/Munki.Catalog.Browser.zip
{'Output': {'url': 'https://github.com/dataJAR/Munki-Catalog-Browser/releases/download/1.2.1/Munki.Catalog.Browser.zip',
'version': '70'}}```
With a value of "beta" being passed to the `update_channel` input_variable:
```Processing /Users/ben/Git/other/dataJAR-recipes/Munki Catalog Browser/Munki Catalog Browser.download.recipe...
WARNING: /Users/ben/Git/other/dataJAR-recipes/Munki Catalog Browser/Munki Catalog Browser.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
SparkleUpdateInfoProvider
{'Input': {'appcast_url': 'https://raw.githubusercontent.com/dataJAR/Munki-Catalog-Browser/appcast/appcast.xml',
'update_channel': 'beta'}}
SparkleUpdateInfoProvider: Version retrieved from appcast: 70
SparkleUpdateInfoProvider: Found URL https://github.com/dataJAR/Munki-Catalog-Browser/releases/download/1.2.1/Munki.Catalog.Browser.zip
{'Output': {'url': 'https://github.com/dataJAR/Munki-Catalog-Browser/releases/download/1.2.1/Munki.Catalog.Browser.zip',
'version': '70'}}```
With a value of being passed to the `update_channel` input_variable which doesn't have a matching channel:
```WARNING: /Users/ben/Git/other/dataJAR-recipes/Munki Catalog Browser/Munki Catalog Browser.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
SparkleUpdateInfoProvider
{'Input': {'appcast_url': 'https://raw.githubusercontent.com/dataJAR/Munki-Catalog-Browser/appcast/appcast.xml',
'update_channel': 'example'}}
Could not obtain valid data from appcast feed.
Failed.
Receipt written to /Users/ben/Library/AutoPkg/Cache/com.github.dataJAR-recipes.download.MunkiCatalogBrowser/receipts/Munki Catalog Browser.download-receipt-20221026-114142.plist
The following recipes failed:
/Users/ben/Git/other/dataJAR-recipes/Munki Catalog Browser/Munki Catalog Browser.download.recipe
Error in com.github.dataJAR-recipes.download.MunkiCatalogBrowser: Processor: SparkleUpdateInfoProvider: Error: Could not obtain valid data from appcast feed.```
Example AppCast feed: https://github.com/dataJAR/Munki-Catalog-Browser/blob/appcast/appcast.xml
* Update __init__.py
This should resolve https://github.com/autopkg/autopkg/pull/764
* Update __init__.py
fix exception catching
* Update __init__.py
rearrange the default assignment.
* Update __init__.py
* add test action
* remove run of test recipe that exists only in my other repo
* remove wrong trigger file, add requirements.txt
* add github token
* Update TestGitHubReleasesInfoProvider.yaml
update test action to use newer requirements file