3369 Commits

Author SHA1 Message Date
apainintheneck
c033a4673c dev-cmd/bump-cask-pr: replace url before downloading files
Previously it was possible for both the version and url to be changed.
This would cause the old url to be used to download the cask and check
the checksum since the version and checksum were replaced in the cask
first and then the url would be replaced. This meant that the resulting
checksum was wrong if a url was provided and might be completely
invalid if it was interpolated.
2023-10-23 19:22:46 -07:00
Mike McQuaid
ab16b59ee7
Merge pull request #16116 from iMichka/dep2
brew unbottled: skip deprecated
2023-10-18 09:08:27 +01:00
Mike McQuaid
f656f8db97
dev-cmd/unbottled: more idiomatic Ruby. 2023-10-18 08:52:25 +01:00
apainintheneck
e48c155f42 dev-cmd/unbottled: share common parts of bottle tag regex
This makes it easier to see that the two regexes are related
and could make it easier to change them in the future if
need be.
2023-10-17 22:41:50 -07:00
Michka Popoff
651cef6f6b
brew unbottled: skip deprecated formulae
We are not interested in bottling them
2023-10-17 23:12:22 +02:00
apainintheneck
83598bb950 cmd/unbottled: Address review feedback for --lost
- Add heading message to indicate bottle tag used
- Use --no-ext-diff with git to avoid potential problems
- Resolve formula renames to avoid false positives
- Increase parsing stringency
2023-10-16 20:51:38 -07:00
apainintheneck
20f00a6427 dev-cmd/unbottled: add --lost option
This option tries to find bottles where the bottle was removed
from the formula in the past week and not added back in.

It checks the output of `git log` to see if there are any
bottles that fit this criteria.
2023-10-15 16:05:17 -07:00
Eric Knibbe
8e01227add
cmd/deps: show deps for head spec with --HEAD
Plus a few man page fixes
2023-10-13 00:29:09 -04:00
David C Hall
a3887482bb
Update tap-new.rb 2023-10-11 19:40:04 -07:00
David C Hall
8e65816335
Adding GHA permission for GitHub Packages
When a tap stores bottles in GitHub Packages, then the publish workflow requires the corresponding write permission.
2023-10-11 19:31:54 -07:00
Jameel Kaisar
2779b8ea7f Add missing permissions to actions publish
This commit adds the missing permissions to the
actions publish script. The 'contents: write'
permission is required to publish releases and
the 'pull-requests: write' permission is required
to close the pull request after the changes are committed.
2023-10-08 22:13:59 +00:00
Jameel Kaisar
61c030b08f Add close pr to actions publish
This commit enhances the publish actions script by
including a step to close the pull request after
committing the changes. The existing script deletes
the branch after pushing the commits, but lacks
the functionality to close the associated PR.
2023-10-08 18:08:56 +00:00
Bo Anderson
71f558229a
Test on Ruby 3.1 2023-09-29 04:46:16 +01:00
Mike McQuaid
4ec5f04e9a
Merge pull request #15953 from Bo98/more-groups
Further split up Gemfile into groups
2023-09-27 19:20:55 +01:00
Bo Anderson
835ebedd18
dev-cmd/unbottled: speed up dependent fetching 2023-09-27 17:45:29 +01:00
Bo Anderson
3b1c171184
Further split up Gemfile into groups 2023-09-27 17:33:44 +01:00
Mike McQuaid
67be775fd9
Merge pull request #16029 from abitrolly/edit-simplify
dev-cmd/edit: Move path specific functions to Pathname
2023-09-27 11:37:47 +01:00
Anatoli Babenia
0c51aea403 Fix typecheck errors 2023-09-27 12:49:37 +03:00
Anatoli Babenia
071a684b25 Replace refinements with local methods 2023-09-27 12:39:03 +03:00
Anatoli Babenia
10a55ec4e1
Rename fail_with_message to raise_with_message! 2023-09-27 08:27:13 +03:00
apainintheneck
5859fcce44 dev-cmd/audit: load formulae from files
This is a test to see if this will fix some flaky checks on CI
that are caused by missing formulae while auditing the core tap.

- https://github.com/Homebrew/brew/issues/16037
2023-09-26 20:37:41 -07:00
Anatoli Babenia
2445b687c6 Use any? to check for warning message and fix brew style 2023-09-26 10:10:47 +03:00
Anatoli Babenia
d16e7e1f32 Rename refinement 2023-09-25 18:50:38 +03:00
Anatoli Babenia
6c7f3eb233 Move condition in interpolated part into variable 2023-09-25 18:11:27 +03:00
Anatoli Babenia
e3c0dafbc4
Update Library/Homebrew/dev-cmd/edit.rb
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2023-09-25 18:03:57 +03:00
Anatoli Babenia
cbee941502 Add proper sig for fail_with_message 2023-09-25 17:34:10 +03:00
Anatoli Babenia
7e835bcd97 Skip backticks when printing env var name 2023-09-25 17:22:18 +03:00
Anatoli Babenia
96ca1c561a Move helper Pathname methods into Refinement
https://docs.ruby-lang.org/en/2.4.0/syntax/refinements_rdoc.html
2023-09-25 17:21:21 +03:00
Anatoli Babenia
466055a1be Use regexp interpolation instead of string concat 2023-09-25 16:13:16 +03:00
Anatoli Babenia
63c60d2859 Rename fail to more descriptive fail_with_message 2023-09-25 15:58:52 +03:00
Anatoli Babenia
a78da3ecf0 Check paths exist before brew install warning 2023-09-25 15:56:41 +03:00
Anatoli Babenia
8f072dc05c Move error reporting logic for absent path to separate method 2023-09-25 15:56:41 +03:00
Anatoli Babenia
eae95670ef Separate logic that shows warning from path detection 2023-09-25 15:56:41 +03:00
Anatoli Babenia
1cbf5ce093 dev-cmd/edit: Move path specific functions to Pathname 2023-09-25 15:56:41 +03:00
Anatoli Babenia
84ce25d370
Make warning message fit 80 char limit
The longest line below limit is 59 chars this way.

Warning: `brew install` ignores locally edited formulae if
`HOMEBREW_NO_INSTALL_FROM_API` is not set.
2023-09-25 06:48:18 +03:00
Anatoli Babenia
a0a4fa4ed9
dev-cmd/edit: ignore linefeed in the message 2023-09-23 13:01:43 +03:00
Anatoli Babenia
4d625d03fc
dev-cmd/edit: make the warning easier to read 2023-09-23 12:56:26 +03:00
apainintheneck
85bd4c7e1f utils/backtrace: scrub sorbet-runtime from backtrace
Ever since we started using this at runtime it's been polluting
the backtrace output. This makes it harder to debug errors and
increases the amount of info users have to paste into the box
when filing an issue.

This is a very direct approach. Essentially, we strip out
everything related to the `sorbet-runtime` gem whenever the top
line in the backtrace is unrelated to sorbet-runtime.

The hope is that this will allow errors related to sorbet to
be diagnosed easily while also reducing the backtrace size
for all other types of errors.

Sometimes it is useful to see the full backtrace though.
For those cases, we include the full backtrace when
`--verbose` is passed in and print a warning that the
Sorbet lines have been removed from the backtrace the
first time they are removed.

Note: This requires gems to be set up so that the call to
`Gem.paths.home` works correctly. For that reason, it must
be included after `utils/gems` which is included in
`standalone/load_path` already.
2023-09-21 21:07:22 -07:00
Eric Knibbe
7c707216a2
dev-cmd/bump: skip head-only & disabled formulae 2023-09-13 18:02:12 -04:00
Eric Knibbe
6235a7f1af
dev-cmd/bump: omit PR lines with --no-pull-requests 2023-09-13 17:59:11 -04:00
Bo Anderson
9cf0d34ee0
Move gem group setting to separate, cacheable file 2023-09-13 14:04:13 +01:00
Mike McQuaid
86acd120b8
Merge pull request #15983 from razvanazamfirei/deprecate-online-flag
bump-cask-pr: deprecate online flag
2023-09-11 14:27:01 +01:00
Razvan Azamfirei
705c466bbd
bump-cask-pr: comment out odeprecated 2023-09-11 09:13:43 -04:00
Mike McQuaid
4e0ec2555e
Merge pull request #15986 from EricFromCanada/docs-assorted-improvements
Docs: assorted refinements for output
2023-09-11 13:06:52 +01:00
Eric Knibbe
c493b5e680
cmd+dev-cmd: fixes for output formatting 2023-09-11 02:29:57 -04:00
Eric Knibbe
4662678b3b
cmd+dev-cmd: adjust description line breaks
Use to distinguish additional notes from initial explanation and usage info
2023-09-11 02:29:21 -04:00
Eric Knibbe
2f79bdd257
global: add HOMEBREW_API_WWW 2023-09-11 02:26:37 -04:00
Eric Knibbe
931f762598
docs+rubydoc: various grammar/wording fixes 2023-09-11 02:26:37 -04:00
apainintheneck
d63e8cde80 cmd/audit: only flush formulary cache when needed
The cache here needs to be cleared when we are auditing multiple
os/arch combinations but not when we are running the audit only
for the current os/arch combination. This gives a 2x speed boost
to `brew audit --skip-style --except-version --tap=homebrew/core` locally.

In theory we could clear the cache less often by running all audits for
one os/arch combination at a time when auditing multiple os/arch combinations.
This would make the output a bit harder to follow and we don't seem to
run those checks on CI so I'm skipping that for now.
2023-09-09 18:47:29 -07:00
apainintheneck
1dc9274f62 Improve cask audit
- check for cask.url in audit steps
- check for cask.version in audit steps
- check for cask.sha256 in fetch command
- stop omitting casks based on nil url in audit command

It would be nice to be able to omit casks from the audit
if the os is not supported but there is not easy way to
do that without updating the SimulateSystem code or
refactoring how MacOSRequirement's are defined in the DSL.
2023-09-07 20:38:17 -07:00