4788 Commits

Author SHA1 Message Date
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
Mike McQuaid
2a5d41d41b
Revert "Merge pull request #14547 from Homebrew/revert-14412-homebrew_install_from_api_default"
This reverts commit f4e60482791d2ff628efadfdbf0d14d9237d2d29, reversing
changes made to e26784f424061ca16987afcb21e036c66a298492.
2023-02-07 19:25:40 +01:00
Mike McQuaid
932d2cf3b7
Merge pull request #14548 from Homebrew/revert-14382-deprecate-disable-remove
Revert "Add deprecations and disables"
2023-02-07 19:11:26 +01:00
Mike McQuaid
f4e6048279
Merge pull request #14547 from Homebrew/revert-14412-homebrew_install_from_api_default
Revert "HOMEBREW_INSTALL_FROM_API: make the default for everyone."
2023-02-07 19:11:14 +01:00
Mike McQuaid
0575903868
Revert "HOMEBREW_INSTALL_FROM_API: make the default for everyone." 2023-02-07 15:13:23 +01:00
Mike McQuaid
6882ac17e7
Revert "Add deprecations and disables" 2023-02-07 15:13:19 +01:00
Mike McQuaid
dbf02366b2
cmd/info: generate --json=v2 from local taps.
Fixes #14541

Co-authored-by: Issy Long <issyl0@github.com>
2023-02-07 15:03:56 +01:00
Bo Anderson
2bb5cdaaa9
Merge pull request #14523 from issyl0/gist-logs-better-token-permissions-message
cmd/gist-logs: On 404, the PAT probably needs more permissions
2023-02-07 01:32:10 +00:00
Issy Long
41b143deec
cmd/gist-logs: On 404, the PAT probably needs more permissions
- This 404 error is from GitHub, and GitHub doesn't give us any more
  informations about scopes for the gist endpoint (for some reason). But we can
  safely assume, as it happens a lot, that "Error: Not Found" (404) is because
  the user hasn't granted their `HOMEBREW_GITHUB_API_TOKEN` the `gist` scope.

Before:

```shell
$ HOMEBREW_GITHUB_API_TOKEN=<token_without_gist_scope> brew gist-logs -p logrotate
Error: Not Found
```

After:

```shell
❯ HOMEBREW_GITHUB_API_TOKEN=<token_without_gist_scope> brew gist-logs logrotate
Error: Your GitHub API token likely doesn't have the `gist` scope.
Create a GitHub personal access token:
https://github.com/settings/tokens/new?scopes=gist&description=Homebrew
echo 'export HOMEBREW_GITHUB_API_TOKEN=your_token_here' >> ~/.zshrc
```
2023-02-06 17:00:02 +01:00
Branch Vincent
8db571e4b0
cmd/doctor: respect --quiet 2023-02-05 15:06:26 -08:00
Mike McQuaid
5f6c69bca2
HOMEBREW_INSTALL_FROM_API: make the default for everyone.
- remove all places we check the flag so it's a no-op now
- flip the messaging to refer to `HOMEBREW_NO_INSTALL_FROM_API` where
  relevant
- adjust the documentation
2023-02-05 18:13:08 +01:00
Mike McQuaid
c1b96e7199
Merge pull request #14382 from MikeMcQuaid/deprecate-disable-remove
Add deprecations and disables
2023-02-05 17:56:58 +01:00
Xuehai Pan
ba3bccf9ed api: download from HOMEBREW_API_DOMAIN 2023-02-04 13:05:20 +00:00
Rylan Polster
9e280f2c44
update: increase max time for API JSON updates 2023-02-03 19:16:30 +01:00
Mike McQuaid
59c03cb2a6
Add deprecations and disables
Do the usual dance:
- commented `odeprecated` to `odeprecated`
- `odeprecated` to `odisabled`
- `odisabled` removed
2023-02-03 10:48:43 +00:00
hyuraku
6945cd7da4 - remove mac/cmd/update-report
- repair if condition
- repair require filename
2023-02-02 18:50:09 +09:00
hyuraku
653930bed8 mv files to os/*/cmd/ 2023-01-28 21:38:40 +09:00
hyuraku
2d864d70e0 apply extend/os to migrate_gcc_dependents_if_needed 2023-01-26 22:21:45 +09:00
Mike McQuaid
91884e0837
cmd/update: tweak API update behaviour.
- Use `HOMEBREW_CASK_REPOSITORY` more consistently
- Skip auto-updating homebrew-core for `HOMEBREW_DEVELOPER` too (without
  explicit `brew update`)
- Also skip auto-updating homebrew-cask
2023-01-26 10:58:21 +00:00
Mike McQuaid
46d727b475
HOMEBREW_INSTALL_FROM_API: various improvements.
- flip the messaging to refer to `HOMEBREW_NO_INSTALL_FROM_API` where relevant
- remove some duplicate checks
- better scope checks to just core tap formulae
2023-01-25 14:29:35 +00:00