4907 Commits

Author SHA1 Message Date
Mike McQuaid
26182fd67a
Note that brew update will only report all without API.
It's not worth supporting this option any longer given the API
constraints.
2023-03-03 08:51:58 +00:00
Douglas Eichelberger
0384b82adc
Merge pull request #14826 from dduugg/no-open-struct
Enable Style/OpenStructUse cop
2023-03-02 12:30:28 -08:00
Mike McQuaid
62ee6faa58
Merge pull request #14802 from MikeMcQuaid/update_report_handle_formula_names
Show New/Deleted Formulae/Casks from `brew update`
2023-03-02 14:16:13 +00:00
hyuraku
e39232313f move cask/cmd/list to cask/list 2023-03-02 21:53:15 +09:00
Carlo Cabrera
a29939e8ed
cmd/update.sh: limit setting core.fsmonitor to false
We set `core.fsmonitor` to `false` in #13586 because Git's fsmonitor
daemon prevented the release of our locks, resulting in errors for some
users reported in #13521.

However, the fix from #13586 set `core.fsmonitor` to `false` too often.
This is not needed for taps, or when `HOMEBREW_REPOSITORY` is different
from `HOMEBREW_PREFIX`. The issue in #13521 stems from the fsmonitor
daemon preventing the release of our locks, so there is no need to
prevent the daemon from monitoring repositories that don't contain our
lock files.
2023-03-02 14:04:31 +08:00
Mike McQuaid
9296db0c41
Merge pull request #14839 from hyuraku/move-cask/cmd/info-to-cask/info
Move `cask/cmd/info` to `cask/info`
2023-03-01 12:25:26 +00:00
Douglas Eichelberger
719f1d6c6e Refactor some use of OpenStruct 2023-02-28 13:05:43 -08:00
Mike McQuaid
2451d017f9
update-report: allow additions/deletions from the API.
If we're installing from the API: we cannot use Git to check for differences in
packages so instead use `{formula,cask}_names.txt` to do so.

The first time this runs: we won't yet have a base state
(`{formula,cask}_names.before.txt`) to compare against so we don't output
anything and just copy the files for next time.
2023-02-28 16:46:44 +00:00
hyuraku
efdef5f26c move cask/cmd/info to cask/info 2023-03-01 00:00:54 +09:00
Carlo Cabrera
1201f18db0
Merge pull request #14667 from carlocab/update-reset-tap-names
cmd/update-reset: improve arg parsing
2023-02-28 22:05:10 +08:00
Carlo Cabrera
53053e0625
cmd/update-reset: improve arg validation
This is based on feedback from #14667.
2023-02-28 20:38:00 +08:00
Carlo Cabrera
12364d70d2
Revert "cmd/update-reset: accept tap names as arguments"
This reverts commit ac7dbc008284e1a85353548eb8e15c008be902ec.
2023-02-28 20:30:40 +08:00
Douglas Eichelberger
2073e70696 brew style --fix 2023-02-27 21:43:10 -08:00
Douglas Eichelberger
f9f73f3ef6 Tidy up 2023-02-27 21:42:47 -08:00
Douglas Eichelberger
1ab278f74c Fix style/type violations 2023-02-27 20:34:07 -08:00
Douglas Eichelberger
0eccc0e987 git grep -l Utils::Inflection | xargs gsed -i 's|Utils::Inflection|Utils|g' 2023-02-27 20:18:27 -08:00
Douglas Eichelberger
3da68651e5 Port more call sites 2023-02-27 20:18:08 -08:00
Douglas Eichelberger
eb2b990575 Port more call sites 2023-02-27 20:17:33 -08:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Mike McQuaid
f284c662de
Merge pull request #14800 from MikeMcQuaid/cleanup_formula_cask_json
Fix references to `formula.json` and `cask.json`
2023-02-24 17:00:37 +00:00
Mike McQuaid
c209c0403d
Fix references to formula.json and cask.json
These would be stranded after `formula.jws.json`.
2023-02-24 16:46:15 +00:00
Mike McQuaid
4ef8632687
cmd/info: handle casks with API.
Fall back to default location.
2023-02-24 15:44:53 +00:00
Mike McQuaid
f280ce069b
Support loading formulae/casks from subdirectories
Previously, we required all formulae and casks to be in a specific
formula or cask directory but did not check any subdirectories.

This commit allows using subdirectories for official taps, the only
ones likely to be big enough to warrant sharding in this way and to
avoid potentially breaking backwards compatibility for existing taps.

This was inspired by the most recent issues with homebrew-cask.
2023-02-24 10:57:41 +00:00
Mike McQuaid
236208ff79
Merge pull request #14756 from apainintheneck/clean-up-extend-os-requires
extend/os: clean up requires
2023-02-23 09:07:59 +00:00
apainintheneck
8de625e0e2 extend/os: clean up requires
These need to be after the original module/class definitions
for the monkey-patching to work correctly.
2023-02-22 21:21:24 -08:00
Bo Anderson
b7d6d00c34
api: use signed endpoint 2023-02-22 21:53:32 +00:00
Issy Long
298bb65dfb
rubocop: Entirely disable Metrics cops
- These are arbitrary length limits that had a load of disables in code.
- The limits were only increasing over time rather than decreasing.
- Fixing the problematic code to be shorter would take a long time for
  questionable gain since the problem has been around so long.
2023-02-21 00:34:17 +00:00
Mike McQuaid
7f1a0936e5
Merge pull request #14702 from issyl0/greedy-short-g
cmd/(outdated,upgrade): Document `-g` as a shorter `--greedy` for Casks
2023-02-20 09:54:18 +00:00
Mike McQuaid
aaec4014fd
Merge pull request #14710 from issyl0/rubocop-excludes
rubocop: Clean up some `Exclude`s
2023-02-20 09:51:11 +00:00
Mike McQuaid
3d3b20b6d6
Merge pull request #14675 from Bo98/api-bash
Further improvements to API handling in shell
2023-02-20 09:45:56 +00:00
Mike McQuaid
ae9763d9ce
Merge pull request #14684 from MikeMcQuaid/no_analytics_uuid
analytics: remove UUID.
2023-02-20 09:18:47 +00:00
Mike McQuaid
57844530a9
analytics: remove UUID.
We don't use this at all with InfluxDB and don't need it any more for GA
so let's just remove it.
2023-02-20 09:05:15 +00:00
Issy Long
f8654bd363
rubocop: In-line disables of Metrics/{Module,Block,Class}Length
- We're not going to make the really long things be any shorter any time soon.
- The instructions in issue 14685 say, pragmatically, "disable all the rubocop
  rules we're never going to realistically fix e.g. Metrics/ClassLength". But
  that felt like a slippery slope to more _really_ long modules/classes/blocks,
  and the limits are here for a reason.
2023-02-19 16:33:23 +00:00
Bo Anderson
c2342eca91
Further improvements to API handling in shell 2023-02-19 05:38:13 +00:00
Issy Long
44b0050b94
cmd/(outdated,upgrade): Document -g as a shorter --greedy for Casks
- Fixes https://github.com/Homebrew/brew/issues/ 14682.
2023-02-18 18:47:49 +00:00
Mike McQuaid
fbdec8738d
Warn more when building from source
We warn sometimes when we tell people to build from source and it's
not supported but we don't actually warn non-developers when invoking
the various install commands so: let's start doing so.

While we're here, also update the existing messaging to reflect the fact
we're on Mastodon now too and we don't want maintainers being
individually bothered about errors either.

I've tried to balance having messages here vs. having them be so long
at the beginning of installation that they will be missed or be overly
obnoxious.
2023-02-17 16:10:38 +00:00
Mike McQuaid
d60d2fe158
cmd/--version: don't always output homebrew/core.
This is more confusing than helpful if it's untapped for API usage.
2023-02-17 13:39:57 +00:00
Mike McQuaid
aa2c2982a0
cmd/update.sh: provide full JSON URL.
This makes it clearer what site cannot be accessed.
2023-02-16 16:03:22 +00:00
Carlo Cabrera
ac7dbc0082
cmd/update-reset: accept tap names as arguments
Currently, doing `brew update-reset homebrew/core` does nothing (not
even return an error). If you want to `update-reset` a given tap, you
must do (the equivalent of)

    brew update-reset "$(brew --repository owner/tap_name)"

This isn't very intuitive, so let's do a bit more work in argument
parsing so that the user can just pass a tap name instead of a path to a
tap.

Passing a path to a tap is also still supported.
2023-02-16 23:57:31 +08:00
Mike McQuaid
9a02d48de7
cmd/analytics: note Google Analytics differences.
Be more explicit about when Google Analytics is disabled and when the
is used or not.
2023-02-16 09:44:07 +00:00
Mike McQuaid
4c8ed77302
Improve homebrew/{core,cask} autotapping.
Don't automatically tap these when running a developer command that's
not using the API.

Fixes #14606
2023-02-14 09:54:24 +00:00
Mike McQuaid
ed79381155
Merge pull request #14574 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-1.45.1
build(deps): bump rubocop from 1.44.1 to 1.45.1 in /Library/Homebrew
2023-02-12 15:11:40 +00:00
Rylan Polster
f7fa5937d8
Allow brew info --json=v2 without taps with JSON API 2023-02-12 12:03:40 +00:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Mike McQuaid
e301fe8fd8
brew.sh: move shared curl speed limit settings here.
This avoids duplication and potentially allows it to be used for various
other `curl` calls.
2023-02-10 17:27:10 +00:00
Mike McQuaid
b9b3bd2571
brew style --fix 2023-02-10 08:59:51 +00:00
Bo Anderson
51d63ee484
cmd/update.sh: fix API download reporting 2023-02-09 18:27:37 +00:00
Bo Anderson
a26a2d71a8
Use --speed-time over --max-time for API downloads 2023-02-09 18:25:52 +00:00
Flier Lu
f08c1e836d increase JSON_API_MAX_TIME 2023-02-09 21:06:46 +08:00
Mike McQuaid
6b4363092d
Revert "Merge pull request #14548 from Homebrew/revert-14382-deprecate-disable-remove"
This reverts commit 932d2cf3b77c9439a57b6a43577fc8d3b6399a62, reversing
changes made to f4e60482791d2ff628efadfdbf0d14d9237d2d29.
2023-02-07 19:25:51 +01:00