36106 Commits

Author SHA1 Message Date
Carlo Cabrera
84cb8a42f7
Revert "Revert "Merge pull request #15369 from carlocab/sorbet-runtime""
We need to exclude any command that might read `lsyncd` on Linux while
simulating macOS. This seems like all of them.

This reverts commit bcf94f6e27d26a6844ee1fa7af73333321015987.
2023-05-08 11:37:48 +08:00
Colin Dean
98d712ceee Adds a TOC to the maintainer checklist
and makes some minor adjustments to wordings to clarify actions to be taken when.
2023-05-07 18:00:49 -04:00
Sam Ford
303ac147a9
GithubLatest: Include URL in match_data
It's standard for the `match_data` to include the URL (e.g., as in
`PageMatch`). This uses the provided URL by default, switching to the
generated URL when available.
2023-05-07 10:21:48 +02:00
Sam Ford
cfba45fb56
GithubLatest: Use API URL as generated value
The generated URL should reflect what we're actually checking, which
is now the `/releases/latest` API URL.
2023-05-07 10:21:48 +02:00
Sam Ford
34e2779150
GithubLatest: Move #generate_input_values
`#generate_input_values` is called before `#versions_from_content`
(in `#find_versions`), so it makes sense to move it above the latter.
2023-05-07 10:21:48 +02:00
Sean Molenaar
573d87cdfa
feat: use API for GitHub latest release strategy 2023-05-07 10:21:48 +02:00
Markus Reiter
1df501b0ac
Tweak tests. 2023-05-07 10:04:28 +02:00
Markus Reiter
ce8788e5bc
Fix code style. 2023-05-07 08:34:13 +02:00
Markus Reiter
81fdb3716e
Implement StanzaOrder cop using on_cask_stanza_block. 2023-05-07 08:30:29 +02:00
Markus Reiter
2dea4f2370
Add on_cask_stanza_block. 2023-05-07 08:30:08 +02:00
Issy Long
8035d46dfe
very wip but reimagined
- Thanks to Markus on Slack for saying "the cop should only apply to the
  content of the blocks, or more specifically only to stanzas that are
  direct children of cask or on_* blocks", which made me realize that
  I was overcomplicating things.
2023-05-07 08:30:08 +02:00
Issy Long
a493787125
Regressed a bit, but at least it's not clobbering anymore? 2023-05-07 08:29:31 +02:00
Issy Long
704482d815
wip a test for ordering of both on_* blocks and their contents
- This is very broken, "detected clobbering" errors.
2023-05-07 08:29:31 +02:00
Issy Long
40bc235cb6
Simplify offending_stanzas method - pass sorted_stanzas in directly
- Otherwise we're doing the same "if inner" check twice, for no gain.
2023-05-07 08:29:30 +02:00
Issy Long
9457a23430
Extract methods for checking for on_* blocks and their contents
- The same code to do the same thing was getting a bit repetitive in
  `Cask/StanzaOrder`, `Cask/StanzaGrouping` and `Cask/NoOverrides`
  cops.
2023-05-07 08:29:30 +02:00
Issy Long
bd6e9e72a1
rubocops/cask: Check for correct stanza ordering within on_* blocks
- Now that we detect correct stanza _grouping_ within `on_*` blocks in
  Casks (PR 15211), correct stanza _ordering_ in `on_*` blocks was the
  next logical step. For example, `url` has to come after `version` and
  `sha256` in an `on_macos` or `on_intel` block for consistency with the
  top-level stanza order we enforce elsewhere.
- Still not doing the nested `on_os` inside `on_arch`, that felt
  excessive for an edge case that isn't present in any actual real
  Casks we have. I removed the test with that specific TODO.
2023-05-07 08:27:43 +02:00
Markus Reiter
1120812378
Merge pull request #15374 from carlocab/longer-arm-timeout
github_runner_matrix: align Intel and ARM timeouts
2023-05-06 23:21:01 +02:00
Markus Reiter
477a26c1be
Merge pull request #15279 from reitermarkus/livecheck-throttle
Type `livecheck.rb`.
2023-05-06 23:20:47 +02:00
Carlo Cabrera
0b33a09090
github_runner_matrix: align Intel and ARM timeouts
This prevents situations where the Intel runners have a 360 minute
timeout but the ARM runners only have 45 minutes.

See Homebrew/homebrew-core#130284.
2023-05-07 00:14:54 +08:00
Markus Reiter
353818f508
Rename curl_head to curl_headers. 2023-05-06 03:41:35 +02:00
Markus Reiter
545a332fef
Use curl_head and curl_output for Livecheck strategies. 2023-05-06 03:40:09 +02:00
Markus Reiter
dfc9d94c5b
Type livecheck.rb. 2023-05-06 03:27:42 +02:00
Issy Long
c1fdb59081
Merge pull request #15370 from p-linnane/sorbet-breakage
Revert "Merge pull request #15369 from carlocab/sorbet-runtime"
2023-05-05 18:28:57 +01:00
Patrick Linnane
bcf94f6e27
Revert "Merge pull request #15369 from carlocab/sorbet-runtime"
This reverts commit 8c059bba279f4b72b783fca91746d14b6286e6fc, reversing
changes made to f71b3d37abcc9cd12b0c8a621bc3712c00db8ec1.
2023-05-05 09:38:02 -07:00
Austin Ziegler
8719946036
Allow brew shellenv to accept a shell name param
Resolves #15358

With this change, `brew shellenv` will accept a shell name parameter to
override its default output (based on `/bin/ps`) for advanced use cases
such as with dotfile templating and caching with
[twpayne/chezmoi](https://github.com/twpayne/chezmoi/discussions/2971).
When running under `fish`, this is the output:

```console
$ brew shellenv pwsh
[System.Environment]::SetEnvironmentVariable('HOMEBREW_PREFIX','/opt/homebrew',[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('HOMEBREW_CELLAR','/opt/homebrew/Cellar',[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('HOMEBREW_REPOSITORY','/opt/homebrew',[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('PATH',$('/opt/homebrew/bin:/opt/homebrew/sbin:'+$ENV:PATH),[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('MANPATH',$('/opt/homebrew/share/man'+$(if(${ENV:MANPATH}){':'+${ENV:MANPATH}})+':'),[System.EnvironmentVariableTarget]::Process)
[System.Environment]::SetEnvironmentVariable('INFOPATH',$('/opt/homebrew/share/info'+$(if(${ENV:INFOPATH}){':'+${ENV:INFOPATH}})),[System.EnvironmentVariableTarget]::Process)
$ brew shellenv
set -gx HOMEBREW_PREFIX "/opt/homebrew";
set -gx HOMEBREW_CELLAR "/opt/homebrew/Cellar";
set -gx HOMEBREW_REPOSITORY "/opt/homebrew";
set -q PATH; or set PATH ''; set -gx PATH "/opt/homebrew/bin" "/opt/homebrew/sbin" $PATH;
set -q MANPATH; or set MANPATH ''; set -gx MANPATH "/opt/homebrew/share/man" $MANPATH;
set -q INFOPATH; or set INFOPATH ''; set -gx INFOPATH "/opt/homebrew/share/info" $INFOPATH;
```

The specific case presented in the mentioned discussion could be
mitigated by an additional level of indirection (`{{ output "fish" "-c"
"'brew shellenv'" | trim }}`), that requires that the running system
have the target shells installed, when they are not strictly necessary
with `brew shellenv`.
2023-05-05 11:50:48 -04:00
Mike McQuaid
8c059bba27
Merge pull request #15369 from carlocab/sorbet-runtime
Revert "Revert "Enable Sorbet by default for Homebrew developers and developer commands.""
2023-05-05 15:37:09 +01:00
Carlo Cabrera
f68b635513
Revert "Revert "Enable Sorbet by default for Homebrew developers and developer commands.""
Along with some fixes for failures in Homebrew/core. See discussion at #15368.

This reverts commit e49cd331dba71b1ced341f1838c7651ecff46a38.
2023-05-05 21:40:51 +08:00
Mike McQuaid
f71b3d37ab
Merge pull request #15367 from dawidd6/pypi-version-to-s
bump-formula-pr: fix method argument type
2023-05-05 13:34:12 +01:00
Dawid Dziurla
d2ea65a12b
Merge pull request #15368 from Homebrew/revert-15326-more_sorbet_runtime
Revert "Enable Sorbet by default for Homebrew developers and developer commands."
2023-05-05 14:16:26 +02:00
Dawid Dziurla
e49cd331db
Revert "Enable Sorbet by default for Homebrew developers and developer commands." 2023-05-05 13:58:58 +02:00
Dawid Dziurla
a341f4346c
bump-formula-pr: fix method argument type 2023-05-05 13:51:14 +02:00
Mike McQuaid
448bf8ba9f
Merge pull request #15326 from MikeMcQuaid/more_sorbet_runtime
Enable Sorbet by default for Homebrew developers and developer commands.
2023-05-05 09:09:34 +01:00
Mike McQuaid
6918fb94ce
Enable Sorbet by default for Homebrew developers and developer commands.
I've been doing this personally for a few months and not hit any bugs.
We already do this for `brew tests`.

It will allow us to:

- remove manual type checks from all developer commands (Sorbet does a
  better job with these)
- better surface bugs
- better surface type signatures
- get closer to being able to enable this by default for everyone
2023-05-05 08:56:53 +01:00
Carlo Cabrera
54adebb1de
Merge pull request #15356 from carlocab/macos-timeout
github_runner_matrix: improve macOS timeout handling
2023-05-04 21:22:29 +08:00
Bo Anderson
7d8815cc9d
Merge pull request #15359 from samuello1228/samuello1228
bottle: some tar flags are not supported on Mojave
2023-05-04 12:49:00 +01:00
Mike McQuaid
0e387fee8c
Merge pull request #15138 from JBYoshi/cask-move-contents
Don't remove cask directories when upgrading.
2023-05-04 11:43:44 +01:00
Samuel Lo
41aab1490a bottle: some tar flags is not supported on Mojave 2023-05-04 04:01:51 +08:00
JBYoshi
3e249a9428
Improve styling. 2023-05-03 11:29:01 -05:00
Mike McQuaid
fec24f5c08
Merge pull request #15352 from woodruffw-forks/ww/step-summary-var
brew: add `GITHUB_STEP_SUMMARY` to allowlist
2023-05-03 11:55:53 +01:00
Mike McQuaid
17911130b3
Merge pull request #15349 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-ast-1.28.1
build(deps): bump rubocop-ast from 1.28.0 to 1.28.1 in /Library/Homebrew
2023-05-03 11:52:45 +01:00
Mike McQuaid
529de96b61
Merge pull request #15355 from carlocab/check-before-upload
github_packages: improve upload error handling
2023-05-03 11:52:27 +01:00
Carlo Cabrera
27eed480ee
github_runner_matrix: improve macOS timeout handling
1. Use the maximum timeout possible for GitHub-hosted macOS runners
2. When using a short timeout, use an even shorter timeout on ARM
   runners.

Our ARM runners are typically at least twice as fast as our Intel
runners on any given job. So, if it takes an ARM runner over half the
timeout to complete a job, it's almost certain that the Intel runner
will not complete the job within the timeout.

Setting an even shorter timeout on the ARM runners will help us abandon
jobs that are unlikely to be completed within the timeout well before we
hit the requested timeout.
2023-05-03 17:55:57 +08:00
Carlo Cabrera
9744b69071
github_packages: use exponential backoff when retrying
The retry behaviour in `publish_commit_bottles.yml` [1] is often
successful after the second try, so it's likely that we're not waiting
long enough in between retries here.

Let's fix that by retrying with exponential backoff instead of adding a
fixed interval of five seconds after each failure.

[1] 3241035b2a/.github/workflows/publish-commit-bottles.yml (L431-L443)
2023-05-03 16:58:16 +08:00
Carlo Cabrera
31a152208b
github_packages: improve upload error handling
Erroring out in the middle of uploading multiple bottles results in a
state that is tedious to recover from.

Let's try to avoid these situations by performing checks for all the
bottles first before trying to upload any.
2023-05-03 16:40:42 +08:00
William Woodruff
ce7283ac32
brew: add GITHUB_STEP_SUMMARY to allowlist
Signed-off-by: William Woodruff <william@yossarian.net>
2023-05-02 19:24:14 -04:00
BrewTestBot
360a43ea7d
Update RBI files for rubocop-ast.
Autogenerated by the [vendor-gems](https://github.com/Homebrew/brew/blob/HEAD/.github/workflows/vendor-gems.yml) workflow.
2023-05-02 19:05:31 +00:00
BrewTestBot
001f5dad12
brew vendor-gems: commit updates. 2023-05-02 19:00:54 +00:00
dependabot[bot]
6557dfc5f2
build(deps): bump rubocop-ast from 1.28.0 to 1.28.1 in /Library/Homebrew
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.28.0 to 1.28.1.
- [Release notes](https://github.com/rubocop/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-ast/compare/v1.28.0...v1.28.1)

---
updated-dependencies:
- dependency-name: rubocop-ast
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-02 18:58:35 +00:00
Mike McQuaid
e62a839001
Merge pull request #15345 from ZhongRuoyu/update-report-no-origin
cmd/update-report: do not fail when tap has no origin
2023-05-02 12:20:10 +01:00
Mike McQuaid
1715b6a4f2
Merge pull request #15348 from Bo98/download-error-fix
Fix DownloadError erroring itself
2023-05-02 08:38:37 +01:00