Homebrew-cask: Implement _appcast verb

Created on 21 Jul 2017  Â·  7Comments  Â·  Source: Homebrew/homebrew-cask

I'm creating a ticket for this because every time I update a cask I wonder if there's a simpler way. Deep inside the intensely awesome checklist of #7683 lies an entry:

  • [ ] _appcast verb which fetches and tests appcast checksums

Now, that was only created 2014-11-19, so it's entirely reasonable that no one's gotten around to implementing it. But I have the itch, and so I'd like feedback about how this should actually be implemented.

Some questions:

  • should this be using the _appcast_checkpoint?
  • are there notes about intended behavior somewhere?
  • should _appcast actually modify the cask file? 99.999% of the time we'll just want to modify if a newer version is available, so if not in the _appcast verb, perhaps another?
  • are there any flags, features or other things we want to support?

I'm hoping the simplest usage that should possibly work might look like:

$ brew cask _appcast ./Casks/terraform.rb
Cask version: 0.9.4
Appcast version: 0.9.11
Downloading terraform... done!
Updated sha256: 123123123123123123123123
Updating cask file... done!

Most helpful comment

Is that a thing others would like to exist?

That’s something that already existed, but had to be scraped. The new behaviour is in my head, but still needs to be fleshed out. There’s a short discussion of it somewhere, with @giannitm. You should find that one and continue there.

But I’ll say your fist example is utopic. We know from experience appcasts vary wildly, even in cases where they share a format and should be similar. Having a generic script for all of them is impossible — it’ll be riddled with edge-cases. Also, whatever the script does it should still call cask-repair, so we get a PR.

See also PRs by @jcbot (auto-updates Intellij casks, made by @leipert) and @victorpopkov’s cask-scripts.

All 7 comments

_appcast verb isn't in the follow-up list posted a year later.


because every time I update a cask I wonder if there's a simpler way

Updating a Cask

ah yes, I remember cask-repair. The problem is that I'm not dealing with official repos:

$ cd ~/src/github.com/unofficial-cask/hashicorp-tap/Casks
$ cask-repair ./terraform.rb
Updating taps… Already up-to-date.
No such cask was found in any official repo (./terraform).
$ cask-repair terraform
Updating taps… Already up-to-date.
No such cask was found in any official repo (terraform).

Does it make sense for me to improve cask-repair instead? I'd much prefer it be in core (and more importantly, in ruby!) but I know that creates a maintenance burden for all time.

_appcast verb which fetches and tests appcast checksums

This is exactly what _appcast_checkpoint does, so this is already implemented.

ah, I misunderstood. My understanding was that an _appcast verb would do what roughly what the cask-repair script does, but generalized to work on any cask or cask file. Namely, to fetch the latest application referenced in the appcast, verify the version and sha are up-to-date. That's really what I'm asking for.

Is that a thing others would like to exist?

Is that a thing others would like to exist?

That’s something that already existed, but had to be scraped. The new behaviour is in my head, but still needs to be fleshed out. There’s a short discussion of it somewhere, with @giannitm. You should find that one and continue there.

But I’ll say your fist example is utopic. We know from experience appcasts vary wildly, even in cases where they share a format and should be similar. Having a generic script for all of them is impossible — it’ll be riddled with edge-cases. Also, whatever the script does it should still call cask-repair, so we get a PR.

See also PRs by @jcbot (auto-updates Intellij casks, made by @leipert) and @victorpopkov’s cask-scripts.

@vitorgalvao I was wondering if my dreams were extravagant, good to know they are.

Is the discussion with @giannitm in a PR, mailing list, &c? Any search terms you could suggest, I think I looked at all the appcast related issues & PRs.

@josephholsten @vitorgalvao This is possibly the short discussion you were referring to?

https://github.com/caskroom/homebrew-cask/pull/33229

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arnogues picture arnogues  Â·  4Comments

vasigorc picture vasigorc  Â·  3Comments

jrwiegand picture jrwiegand  Â·  3Comments

tycm picture tycm  Â·  3Comments

wamatt picture wamatt  Â·  3Comments