Skip to content

Conversation

@vvvvv
Copy link

@vvvvv vvvvv commented May 3, 2023

The fact that you had to use brew upgrade --cask wezterm-nightly --no-quarantine --greedy-latest to upgrade wezterm-nightly was annoying me so I started looking for a solution.
Seeing that I'm not the only one annoyed by this (see #8 ) I've created this pull request which fixes the need for additional flags.

Apparently brew formulas use a livecheck to check whether an upgrade is done or not.
I've noticed that github sets the last-modified header to the date and time the file was uploaded and brew has a livecheck which is able to access http headers.
I'm using the date and time to construct a pseudo version which is just <year><month><day><hour><minute><second> without the < >.
Yesterday I've setup my own homebrew repo to test if this would work and it does.
I've been able to upgrade nightly like any other cask.

I'll open a pull request on the official homebrew-cask repo as well although I'm not sure if it'll get accepted because the livecheck I've used states:

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

This is the reason I'm opening the pull request here first.

That being said I've seen other casks in the official repo which also use this livecheck strategy.

vvvvv added 2 commits May 3, 2023 11:53
…a flags

added livecheck which is used to determine whether an upgrade is executed or not.
this livecheck uses the last-modified http header which is set to the date/time the file was uploaded to see if there is a new version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant