Skip to content

Latest commit

 

History

History
33 lines (18 loc) · 3.96 KB

File metadata and controls

33 lines (18 loc) · 3.96 KB

appcast

The value of the appcast stanza is a string, holding the URL for an appcast which provides information on future updates.

The main casks repo only accepts submissions for stable versions of software (and documented exceptions), but it still gets pull requests for unstable versions. By checking the submitted version against the contents of an appcast, we can better detect these invalid cases.

Example: atom.rb

There are a few different ways the appcast can be determined:

  • If the app is distributed via GitHub releases, the appcast will be of the form https://github.com/{{user}}/{{project_name}}/releases.atom. Example: electron.rb

  • If the app is distributed via GitLab releases, the appcast will be of the form https://gitlab.com/{{user}}/{{project_name}}/-/tags?format=atom. Example: grafx.rb

  • The popular update framework Sparkle generally uses the SUFeedURL property in Contents/Info.plist inside .app bundles. Example: glyphs.rb

  • Sourceforge projects follow the form https://sourceforge.net/projects/{{project_name}}/rss. A more specific page can be used as needed, pointing to a specific directory structure: https://sourceforge.net/projects/{{project_name}}/rss?path=/{{path_here}}. Example: seashore.rb

  • An appcast can be any URL hosted by the app’s developer that changes every time a new release is out or that contains the version number of the current release (e.g. a download HTML page). Webpages that only change on new version releases are preferred, as are sites that do not contain previous version strings (i.e. avoid changelog pages if the download page contains the current version number but not older ones). Example: razorsql.rb

The find-appcast script is able to identify some of these, as well as electron-builder appcasts which are trickier to find by hand. Run it with "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/developer/bin/find-appcast" '{{/path/to/software.app}}'.

Parameters

key value
must_contain: a custom string for brew cask audit --appcast {{cask_file}} to check against.

Sometimes a version doesn’t match a string on the webpage, in which case we tweak what to search for. Example: if version is 6.26.1440 and the appcast’s contents only show 6.24, the check for “is version in the appcast feed” will fail. With must_contain, the check is told to “look for this string instead of version”. In the example, must_contain: version.major_minor is saying “look for 6.24”, making the check succeed.

If no must_contain is given, the check considers from the beginning of the version string until the first character that isn’t alphanumeric or a period. Example: if version is 6.26b-14,40, the check will see 6.26b. This is so it covers most cases by default, while still allowing complex versions suitable for interpolation on the rest of the cask.

Example of using must_contain: hwsensors.rb