25 Commits

Author SHA1 Message Date
Sam Ford
45a642c363
SkipConditions: check disabled before deprecated
We have some formulae and casks that contain both `deprecate!` and
`disable!` calls, presumably as a way of controlling the deprecation
behavior before the disable date is reached. However, once the disable
date has been reached, `Livecheck::SkipConditions` continues to skip
the package as deprecated instead of disabled. This isn't a functional
issue as the package is still skipped but it isn't accurate because
it's not being skipped as disabled.

This reorders `FORMULA_CHECKS` and `CASK_CHECKS` to run the disabled
check before the deprecated check, so the disable date will take
precedence when it's been reached.
2025-09-02 11:32:22 -04:00
Bevan Kay
97b1683466
cask: replace unsigned deprecation reason with fails_gatekeeper_check 2025-08-18 18:04:57 +10:00
Sam Ford
ff2b1d6821
SkipConditions: special case unsigned deprecations
We've been adding `disable!` calls with a future date to casks using
an unsigned app. That implicitly deprecates the cask until it reaches
the disable date, so we've been having to add simple `livecheck`
blocks to casks that use a default check to ensure that livecheck
continues to check them. It was suggested that it would be simpler to
have livecheck not skip casks that have a `disable!` call with a
`because: :unsigned` argument and I agree, so this modifies
`SkipConditions` to add a special case for this scenario.
2025-08-03 15:03:25 -04:00
Patrick Linnane
4513a43d53
Fix RuboCop failures.
Co-authored-by: Patrick Linnane <patrick@linnane.io>
Co-authored-by: Carlo Cabrera <github@carlo.cab>
Co-authored-by: Thierry Moisan <thierry.moisan@gmail.com>
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2025-07-14 19:12:38 +01:00
Sam Ford
01cb74e525
livecheck: clarify livecheckable language
Formulae, casks, and resources have a `#livecheckable?` method that
indicates whether they contain a `livecheck` block. This is intended
to be read as "has a livecheckable?", not "is livecheckable?" (as
livecheck can find versions for some packages/resources without a
`livecheck` block). Unfortunately, correct understanding of this
method's behavior [outside of documentation] relies on historical
knowledge that few people possess, so this is often confusing to
anyone who hasn't been working on livecheck since 2020.

In the olden days, a "livecheckable" was a Ruby file containing a
`livecheck` block (originally a hash) with a filename that
corresponded to a related formula. The `livecheck` blocks in
livecheckable files were integrated into their respective formulae in
August 2020, so [first-party] livecheckables ceased to exist at that
time. From that point forward, we simply referred to these as
`livecheck` blocks.

With that in mind, this clarifies the situation by replacing
"livecheckable" language. This includes renaming `#livecheckable?` to
`#livecheck_defined?`, replacing usage of "livecheckable" as a noun
with "`livecheck` block", replacing "livecheckable" as a boolean with
"livecheck_defined", and replacing incorrect usage of "livecheckable"
as an adjective with "checkable".
2024-12-02 10:13:03 -05:00
Bo Anderson
f877fc5058
livecheck: remove module_function 2024-08-23 04:57:28 +01:00
Sam Ford
7ba189a018
livecheck: expand typed: strict usage
This updates livecheck files to use `typed: script` where feasible.

The remaining exception is `livecheck/strategy.rb`, as I wasn't
able to figure out how to resolve the typing issues around the
`@strategies` variable (I tried a couple of approaches but couldn't
find a working solution). This includes changes to resolve the other
type errors in `strategy.rb` but leaves the file as `typed: true`
for now.
2024-07-04 20:22:14 -04:00
Rylan Polster
e07273a110
Remove redundant early return in livecheck skip_conditions 2024-06-29 11:42:24 -04:00
Mike McQuaid
222fe8ef0b
Homebrew 4.3.0 deprecation/disable/removals.
The usual pass of deprecating/disabling/removing code for the next
minor Homebrew release.
2024-05-07 12:18:04 +01:00
Markus Reiter
0f0055ede4
Make documentation @api private by default. 2024-04-26 19:04:20 +02:00
Sam Ford
a8d506fdda
livecheck: Add ExtractPlist skip to SkipConditions
When the `--extract-plist` option was added to livecheck, conditions
were added in `#run_checks` to skip casks using `ExtractPlist` if the
`--extract-plist` isn't used and the run involves multiple
formulae/casks. This integrates the skip into the `SkipConditions`
class.
2024-03-31 21:01:39 -04:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args. 2024-03-07 16:20:20 +00:00
Douglas Eichelberger
d6b3f5031a
Enable and fix warnings 2024-02-19 13:57:27 +00:00
Rylan Polster
25b753fe51
Re-add some discontinued? checks for casks 2023-12-17 19:07:37 -05:00
Rylan Polster
7eb3f1a314
Replace discontinued? with deprecated? 2023-12-16 20:01:47 -05:00
Douglas Eichelberger
24cf6076e8 brew style --fix 2023-04-24 20:42:39 -07:00
Sam Ford
40b0070beb
Modify comments and other text
The `check_for_resources` code arguably speaks for itself, so it
doesn't feel like a necessary addition. Besides that, this cleans up
some other comments and text to better align with existing examples.
2022-09-27 00:18:20 -04:00
Mohammad Zain Abbas
03c372ef52 Minor fixes 2022-09-25 02:06:23 +02:00
Mohammad Zain Abbas
7a627565ac Fixed output issue 2022-09-14 04:54:52 +02:00
Mohammad Zain Abbas
8496ca0416 Added skip_conditions support for resource 2022-09-14 03:42:12 +02:00
mhmdanas
37c46e1acd Remove space before colon in livecheck output 2022-04-27 01:09:16 +03:00
Sam Ford
ddde0f7589
livecheck: allow inheriting from a formula/cask 2021-08-02 09:12:22 -04:00
nandahkrishna
8e5451df2f
style: use parentheses for assignment in conditions 2021-02-12 18:33:37 +05:30
Seeker
fbafaff4fe rubocop: require braces for Sorbet sig 2021-01-18 16:52:45 -08:00
Sam Ford
12e5f4dce1
Livecheck: Refactor #skip_conditions into a module
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-01-12 18:34:33 -05:00