Mike McQuaid
f1ba840193
Merge pull request #16889 from Homebrew/adopt_bundle_version
...
cask/artifact: check the bundle version when using `--adopt`.
2024-03-14 16:42:01 +00:00
Mike McQuaid
f086138043
Fix GitHub Actions annotation format.
...
Co-authored-by: Bo Anderson <mail@boanderson.me>
2024-03-14 14:09:11 +00:00
Mike McQuaid
a3702a28c4
cask/artifact: check the bundle version when using --adopt
.
...
This makes `--adopt` considerably faster and more useful for application
bundles by checking the bundle version before failing to adopt the
bundle.
This could be further extended by e.g. checking if auto-updates are
enabled.
While we're here, also allow `adopt` to act a bit more like `force` in
a few other places assuming this initial check passes.
2024-03-14 10:31:31 +00:00
Mike McQuaid
dcaa69a2dc
Add GitHub Actions warning/error annotations for deprecations/disables.
...
This should make these messages, particular warnings, more obvious to
GitHub Actions users.
There's an argument perhaps we should do this more broadly for all
warning/error messages but: this feels like a good start.
2024-03-14 09:49:12 +00:00
Markus Reiter
e575671477
Actually remove FromDefaultNameLoader
.
2024-03-12 22:50:13 +01:00
Mike McQuaid
b1990ed4b6
Merge pull request #16863 from apainintheneck/memoize-installed-tap-loading-v2
...
Memoize installed tap loading v2
2024-03-12 08:36:09 +00:00
apainintheneck
08442734ab
s/Tap.reverse_tap_migrations_renames/Tap.tap_migration_oldnames/
2024-03-09 10:27:22 -08:00
apainintheneck
d4a273443c
tap: add #reverse_tap_migrations_renames to speed things up
...
This gets used by `Tap.reverse_tap_migrations_renames` and reduces
the amount of information that needs to be calculated on the fly
every time.
2024-03-09 10:25:47 -08:00
Michael Cho
85a08bcdc4
cask/audit: allow @ for versioned casks
...
Signed-off-by: Michael Cho <michael@michaelcho.dev>
2024-03-09 12:20:27 -05:00
Mike McQuaid
b70884a474
Merge pull request #16848 from Homebrew/rubocop_default_hash_syntax
...
rubocop: default hash syntax.
2024-03-08 07:55:33 +00:00
apainintheneck
e0cea903ec
s/to_api_hash/to_internal_api_hash/
2024-03-07 20:29:58 -08:00
apainintheneck
12d5a40262
dev-cmd/generate-cask-api: start generating cask internal JSON v3
...
This adds a new file to the output of `brew generate-cask-api` which
represents the new internal JSON v3 file. It involves removing
a bunch of unneeded hash keys while removing blank ones as well.
I've made some slight changes to the cask loader as well but more
might be necessary before this starts loading things correctly.
The full loader code will be added in a separate PR.
2024-03-07 20:29:58 -08:00
Mike McQuaid
ea2892f8ee
brew.rb: handle missing args.
2024-03-07 16:20:20 +00:00
Mike McQuaid
9259c345cc
utils/analytics: general cleanup.
...
We have plans to add analytics for commands and `brew test-bot`
This requires a certain amount of refactoring which I've done here.
There was also a bunch of legacy `*_influx_?` usage from when we used
both InfluxDB and Google Analytics that made sense to clean up and
excessive indirection.
2024-03-07 15:19:04 +00:00
Markus Reiter
a24da6b072
Remove FromDefaultNameLoader
to avoid warning twice.
2024-03-06 23:14:28 +01:00
Mike McQuaid
03e583e746
cask: read bundle version from Info.plist
when sensible.
...
If you're trying to use `brew info --json=v2` to get an installed
version and figure out if it is outdated: you're going to have a bad
time with `auto_updates` casks because `installed_version` alone is not
enough to get the actually currently installed version of the app.
Instead, in these cases, try to read from `Info.plist` if there is one
and use that version.
While we're here, add a `blank?` method to `Version` so we can use it
for `present?` checks (making a `null?` `Version` object `blank?`).
Co-authored-by: Markus Reiter <me@reitermark.us>
2024-03-06 15:52:16 +00:00
Markus Reiter
a851bb86ef
Add type signature for Tap::fetch
.
2024-03-06 14:30:17 +01:00
Mike McQuaid
c5e7282985
Merge pull request #16807 from dduugg/numbered-params
...
Prefer numbered block params over proc conversion
2024-03-04 16:38:14 +00:00
Douglas Eichelberger
c4db19232d
git grep -lE '\(\&[A-Za-z._]+method\(:' | xargs gsed -i -E 's|\(\&([A-Za-z._]+)method\(:([a-z?_]+)\)\)| { \1\2(_1) }|g'
2024-03-03 18:55:56 -08:00
Douglas Eichelberger
90996e1997
git grep -lE '\(\&[A-Za-z._]+method\(:' | xargs gsed -i -E 's|\(\&([A-Za-z._]+)public_method\(:([a-z?_]+)\)\)| { \1\2(_1) }|g'
2024-03-03 18:55:32 -08:00
Bo Anderson
2d929b8a9f
cask/quarantine: avoid xcrun when executing Swift
2024-03-02 19:31:38 +00:00
Markus Reiter
c3c5437c4f
Rename Tap#reverse_cask_renames
to Tap#cask_reverse_renames
.
2024-03-01 12:57:37 +01:00
Mike McQuaid
f1eea64523
Merge pull request #16779 from reitermarkus/fix-load-from-path
...
Fix loading casks/formulae from relative paths.
2024-03-01 08:47:41 +00:00
Markus Reiter
3da0f8c4a6
Fix loading casks/formulae from relative paths.
2024-03-01 04:05:15 +01:00
Markus Reiter
755c8aecad
Simplify Tap#cask_files_by_name
.
2024-02-29 22:47:43 +01:00
Bo Anderson
1d7101d8a3
Use HOMEBREW_TEMP more universally
2024-02-26 16:58:53 +00:00
Issy Long
f4218a6316
Fix RuboCop Performance/MapCompact
offenses
...
- Rename an iterator variable since it would make the line too long.
2024-02-25 22:59:59 +00:00
Markus Reiter
670eb3d02d
Remove CaskLoader::tap_paths
.
2024-02-20 18:25:11 +01:00
Markus Reiter
876535c670
Use HOMEBREW_DEFAULT_TAP_CASK_REGEX
in FromDefaultNameLoader
.
2024-02-13 21:52:45 +01:00
Markus Reiter
d506645667
Add separate loader for default tap.
2024-02-13 21:25:52 +01:00
Markus Reiter
a3a1b4c253
Check tap migrations for renames.
2024-02-13 06:03:10 +01:00
Markus Reiter
b4d602e70b
Don't warn about renamed installed casks.
2024-02-13 04:37:10 +01:00
Markus Reiter
eaf7b38995
Allow tap migrations with renames.
2024-02-13 04:17:43 +01:00
Markus Reiter
c39abef045
Always prefer default tap.
2024-02-12 21:45:07 +01:00
Markus Reiter
48c9897081
Convert FromNameLoader
to class.
2024-02-12 07:43:29 +01:00
Markus Reiter
8e04ab8b42
Fix type signature.
2024-02-12 07:14:28 +01:00
Markus Reiter
0211feebd7
Fix loading test fixtures.
2024-02-12 07:14:27 +01:00
Markus Reiter
6f28392d6e
Remove FromDefaultTapPathLoader
and FromDefaultTapLoader
.
2024-02-12 07:12:33 +01:00
Markus Reiter
d17aa66759
Avoid T.cast
.
2024-02-12 07:12:32 +01:00
Markus Reiter
3e61e3b428
Stop following recursive tap migrations.
2024-02-10 15:07:31 +01:00
Markus Reiter
cb13f95928
Avoid T.cast
.
2024-02-09 16:59:27 +01:00
Markus Reiter
1323262610
Rename constant.
2024-02-08 19:22:02 +01:00
Markus Reiter
76d8d6c840
Add type signatures.
2024-02-08 16:30:08 +01:00
Markus Reiter
a37afcb777
Fix loading renamed casks from API.
2024-02-08 16:29:31 +01:00
Markus Reiter
889854b0b3
Merge FromTapPathLoader
into FromPathLoader
.
2024-02-08 16:20:32 +01:00
Markus Reiter
dc21095731
Simplify multiple if
s into single case
statement.
2024-02-08 16:20:32 +01:00
Markus Reiter
732e4438f4
Use token
instead of name
for casks.
2024-02-08 16:20:31 +01:00
Markus Reiter
6e5b6b7cc9
Remove unused parameter from CaskLoader::tap_paths
.
2024-02-08 16:20:31 +01:00
Markus Reiter
c301b9c703
Readd debug logging.
2024-02-07 14:02:12 +01:00
Markus Reiter
825222cc83
Simplify code style.
...
Co-authored-by: Kevin <apainintheneck@gmail.com>
2024-02-07 14:02:10 +01:00