Add head_only? to Formula, replace head? in livecheck#8680
Add head_only? to Formula, replace head? in livecheck#8680nandahkrishna merged 2 commits intoHomebrew:masterfrom nandahkrishna:livecheck-head
head_only? to Formula, replace head? in livecheck#8680Conversation
|
You can try adding |
|
As suggested by Sam (and discussed previously), I've added I've also added a comment stating that all formulae will have normal checks carried out unless they are HEAD-only (worded almost exactly like Sam's comment in their review) to The only issue that remains to be solved is that of the downloader continuing to be verbose, I'll implement Dawid's suggestion and let you all know if it solves the problem. Do let me know if anything has to be modified. Thanks! |
--installedhead_only? to Formula, replace head? in livecheck
samford
left a comment
There was a problem hiding this comment.
changed the value of
currenttoformula.stable.version, and that seems to solve the issue
I tested this and can confirm that the reported version for a formula with stable and head that's installed using --head is the HEAD commit hash when running brew livecheck --installed. Using formula.stable.version instead of formula.version addresses this and makes sense to me 👍
|
Sorry for the delay, was slightly occupied with some other work. With the latest push:
|
brew stylewith your changes locally?brew testswith your changes locally?The
brew livecheck --installedcommand is supposed to runlivecheckfor all formulae that have been installed. Aslivecheckreports new versions of software from upstream (compared to the homebrew-core version and not the system-installed version), one would expect this command to work just likebrew livecheckdoes but only limits the Formulae checked.However,
This happens because I have a
HEAD-version ofarduino-cliinstalled, despite it not being a HEAD-only formula.This PR fixes the
--installedflag to check only installed formulae, but report their stable version instead (if it exists).For a HEAD-only formula, we continue to report HEAD version updates.
One problem still persists, for HEAD-only formulae, the output of
fetch_latest_commitis not silenced despite theformula.head.downloader.shutup!. While I tried looking throughContextandAbstractDownloadStrategy, I wasn't able to come up with a fix. It seems like setting@quiet = trueisn't working. Any idea why?