Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CONTRIBUTING: explain how to add appcasts #16689

Closed
7 tasks done
vitorgalvao opened this issue Jan 10, 2016 · 11 comments
Closed
7 tasks done

CONTRIBUTING: explain how to add appcasts #16689

vitorgalvao opened this issue Jan 10, 2016 · 11 comments

Comments

@vitorgalvao
Copy link
Member

Expands on #16464. That one was about updating, this is about creating.

There are some doubts as to how to create appcasts. That is merely an example of someone that expressed it, though, as I also see new contributions that could easily have an appcast added (github releases), but don’t. We should really add a how to add them.

  • Explain how to find them:
    • If the cask uses the app stanza, look inside its Info.plist for the SUFeedURL.
      • Make /developer/bin script for it.
    • If the app is distributed via gitub releases, appcast will be of the form https://github.com/{{user}}/{{project}}/releases.atom.
    • An appcast can be any URL hosted by the app’s developer that changes every time a new release is out (e.g. a changelog).
  • Explain how to find its :checkpoint (curl --compressed '{{appcast_url}} | sed 's|<pubDate>[^<]*</pubDate>||g' | shasum --algorithm 256 | awk '{print $1}').
  • Add documentation from CONTRIBUTING: explain how to add appcasts #16689 (comment) to live docs.
@vitorgalvao vitorgalvao added the documentation Issue regarding documentation. label Jan 10, 2016
@adidalal
Copy link
Contributor

I can tackle this as part of an upcoming (further) rewrite of CONTRIBUTING

@adidalal adidalal self-assigned this Jan 10, 2016
@vitorgalvao
Copy link
Member Author

@adityadalal924 Will leave the documentation to you, then.

As for the script, adding it in #16701.

@adidalal
Copy link
Contributor

Appcasts

Appcasts provide a mechanism for updates to applications. There are a few different ways these can be determined:

  • If the app is distributed via GitHub releases, the appcast will be of the form https://github.com/{{user}}/{{project}}/releases.atom. (Example Cask - electron.rb)
  • A popular update framework, Sparkle generally uses the SUFeedURL property inside Contents/Info.plist. You can use the script developer/bin/find_sparkle_appcast to add this automatically. (Example Cask - glyphs.rb)
  • An appcast can be any URL hosted by the app’s developer that changes every time a new release is out (e.g. a changelog RSS feed). (Example Cask - fluid.rb)

Appcasts have a required :checkpoint property. (This is used by the Homebrew-Cask team to determine updates). You can use curl --compressed "{{appcast_url}}" | sed 's|<pubDate>[^<]*</pubDate>||g' | shasum --algorithm 256 to get the :checkpoint value for the appcast.

If the application has a Check for Updates... option in its menu, you should also add auto_updates true to the Cask.

@adidalal adidalal added the awaiting maintainer feedback Issue needs response from a maintainer. label Jan 11, 2016
@adidalal adidalal removed their assignment Jan 11, 2016
@adidalal
Copy link
Contributor

@vitorgalvao Documentation above should now be ready, according to recent updates.

@vitorgalvao
Copy link
Member Author

@adityadalal924 I saw. I was editing your post (after editing the top one) and github warned me “the content you’re trying to edit has changed”.

@vitorgalvao
Copy link
Member Author

@adityadalal924 Oh, you called it :checkpoint already, even. That I hadn’t noticed.

@adidalal
Copy link
Contributor

Still undecided about {{appcast_url}} vs $appcast_url styling for user-replaced variables. If you like that then CONTRIBUTING.MD should also use that style - whatever we decide, it should be consistent (We can always add a footnote about this format and what it means as extra clarification)

@vitorgalvao
Copy link
Member Author

Still undecided about {{appcast_url}} vs $appcast_url styling for user-replaced variables.

Whatever you prefer. You’ve been working more on CONTRIBUTING, so I trust the decision to you.

I somewhat prefer ${appcast_url} to $appcast_url, though (same with other variables) as it’s clearer where it begins and ends.

@adidalal adidalal removed the awaiting maintainer feedback Issue needs response from a maintainer. label Jan 13, 2016
@vitorgalvao
Copy link
Member Author

Made another change (addition) to the command. curl now uses --compressed. It doesn’t change anything in the ones that were already set, but it lets us use the ones that are gzipped on transfer.

@adidalal
Copy link
Contributor

Will update as script is updated in cask-repair (I'm using that as "ground truth" for the documentation for now)

@vitorgalvao
Copy link
Member Author

curl --silent 'https://raw.githubusercontent.com/vitorgalvao/tiny-scripts/master/cask-repair' | grep 'pubDate' should be a quick way to see how it currently works in cask-repair. It’s unlikely there’ll be more changes, though.

@miccal miccal removed the documentation Issue regarding documentation. label Dec 23, 2016
@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants