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 checksumsNow, 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:
_appcast_checkpoint?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!
_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
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.
_appcastverb 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?
Most helpful comment
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.