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

Implement _appcast verb #36821

Closed
1 task
josephholsten opened this issue Jul 20, 2017 · 7 comments
Closed
1 task

Implement _appcast verb #36821

josephholsten opened this issue Jul 20, 2017 · 7 comments

Comments

@josephholsten
Copy link
Contributor

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!
@commitay
Copy link
Contributor

commitay commented Jul 20, 2017

_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

@josephholsten
Copy link
Contributor Author

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.

@reitermarkus
Copy link
Member

_appcast verb which fetches and tests appcast checksums

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

@josephholsten
Copy link
Contributor Author

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?

@vitorgalvao
Copy link
Member

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.

@josephholsten
Copy link
Contributor Author

@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.

@gtmgianni
Copy link
Contributor

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

#33229

@lock lock bot locked as resolved and limited conversation to collaborators May 7, 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

5 participants