400 Commits

Author SHA1 Message Date
Patrick Linnane
86f56c8bd5
test/dev-cmd/tap-new_spec: use --no-git to avoid auth prompt
Signed-off-by: Patrick Linnane <patrick@linnane.io>
2025-04-12 19:15:07 -07:00
Sam Ford
b7065d5fcf
bump-cask-pr: extract system_options generation
This extracts the logic for generating the `system_options` array in
the `replace_version_and_checksum` method into a separate
`generate_system_options` method. This logic is becoming more complex
(after recent changes) and manually testing it is a pain, so this
change is intended to allow us to add tests. The tests added here
provide 100% coverage for the method.
2025-04-06 10:58:46 -04:00
Bevan Kay
cbc79184ad
test/dev-cmd/create: allow use of @ in cask name 2025-03-12 19:58:03 +11:00
Mike McQuaid
6f99704a64
Import brew formula-analytics and generate-analytics-api commands
Import these from the homebrew/formula-analytics tap and deprecate
that tap.

This required a little messing around with filenames and paths to get
it finding Python and writing to the user's home directory.
2025-02-07 20:05:05 +00:00
William Woodruff
27be7b50a1
dev-cmd: add a basic verify test
Signed-off-by: William Woodruff <william@yossarian.net>
2025-02-04 13:08:53 +01:00
Bevan Kay
597f5fa018
generate-cask-ci-matrix: fix incorrect error raised 2024-11-18 12:59:56 +11:00
Bevan Kay
dd3ad5bb56
add generate-cask-ci-matrix command 2024-11-16 22:19:09 +11:00
Carlo Cabrera
51c4421409
Change default Homebrew/core CI runners
We will now build on Ventura (macOS 13) to Sequoia (macOS 15).

Runners for macOS 15-x86_64 will not be allocated by default due to a
lack of appropriate hardware.
2024-09-12 22:06:10 +08:00
Carlo Cabrera
c51bb196d1
tests: update determine-test-runners tests
We've decoupled the macOS versions there from
`MacOSVersion#supported_release?`, so these tests need updating.
2024-09-11 20:20:08 +08:00
apainintheneck
a3e917afe1 Refactor method to remove extra tap requires
We were selectively requiring the tap.rb file in a few places for
performance reasons. The main method we were referencing was the
`Tap.cmd_directories` method which uses `Pathname` and the `TAP_DIRECTORY`
constant internally. `Tap.cmd_directories` is mostly used in the `Commands`
module and that is loaded very early on in the program so it made sense
to move that command to that module. To facilitate that I moved the
`TAP_DIRECTORY` constant to the top-level and renamed it to
`HOMEBREW_TAP_DIRECTORY`. It now lies in the tap_constants.rb file.

A nice bonus of this refactor is that it speeds up loading external
commands since the tap.rb file is no longer required by default in
those cases.
2024-08-10 13:49:10 -07:00
Issy Long
d7123d43c7
test/dev-cmd/bottle: Mark the bottling test as needs_network
- I was on a plane and this failed with:

```
expected block to not output to stderr, but output
"curl: (6) Could not resolve host: spdx.github.io\nWarning: Failed to fetch SBOM schema, cannot perform SBOM validation!
Warning: Could not fetch JSON schema to validate SBOM!\nWarning: SBOM is not valid, not writing to disk!"
```
2024-07-11 21:16:14 -04:00
Mike McQuaid
c13700af00
Use repository consistently instead of repo
The documentation linting job doesn't like `repo` so let's fix this
globally rather than naming it differently in documentation and code.
2024-06-10 09:31:53 +01:00
Carlo Cabrera
a9c8556b9d
github_runner_matrix: define timeout values in constants
This allows us to keep all information about timeout values here in
`brew` instead of both here and in Homebrew/core.

Will be needed after Homebrew/homebrew-core#171457.
2024-05-12 04:48:00 +08:00
Carlo Cabrera
90c198fd5c
determine-test-runners: fix failing test 2024-05-12 02:09:37 +08:00
Mike McQuaid
4ffcd8a110
Various improvements for brew command
- Add a (large) speedup by moving some logic to Bash for the typical
  case of a normal or dev-cmd, Bash or Ruby command.
- Make `brew command` a non-developer command, I don't think it makes
  sense to consider it something needed for developing Homebrew.
- Update the manpage/tests/RBI accordingly.

Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com>
2024-04-30 11:38:19 +01:00
Caleb Xu
934398dd9a
test: conditionally deny network access in sandbox 2024-04-22 22:39:45 -04:00
Douglas Eichelberger
8ebcadd1c9 Clean up args_parse tests 2024-04-02 12:19:14 -07:00
Douglas Eichelberger
fde7d380f7 Don't include FileUtils everywhere 2024-03-30 19:10:56 -07:00
Douglas Eichelberger
03b815df82 Enable and fix RSpec/DescribedClassModuleWrapping 2024-03-30 11:29:34 -07:00
Douglas Eichelberger
7f9748bd03 Port Homebrew::DevCmd::VendorGems 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
084f63ef22 Port Homebrew::DevCmd::UpdateTest 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
c789bf4475 Port Homebrew::DevCmd::UpdateSponsors 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
7bef4b010c Port Homebrew::DevCmd::UpdatePythonResources 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
46d758d5cf Port Homebrew::DevCmd::UpdateLicenseData 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
bdf8fbc1ad Port Homebrew::DevCmd::Unpack 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
ba5f392d4c Port Homebrew::DevCmd::Typecheck 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
445d81db2e Port Homebrew::DevCmd::Tests 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
827e943803 Port Homebrew::DevCmd::Test 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
e0519d736a Port Homebrew::DevCmd::TapNew 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
0d04f198d2 Port Homebrew::DevCmd::StyleCmd 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
1436b06e90 Port Homebrew::DevCmd::Sh 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
177bab38c7 Port Homebrew::DevCmd::Release 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
6d362ccb3b Port Homebrew::DevCmd::PrUpload 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
dc062bea52 Port Homebrew::DevCmd::PrPull 2024-03-22 09:33:28 -07:00
Douglas Eichelberger
97370b4e6a Use @min_named_args to generate argv 2024-03-21 19:48:15 -07:00
Douglas Eichelberger
b37274de8b Port Homebrew::DevCmd::PrPublish 2024-03-21 19:04:31 -07:00
Douglas Eichelberger
972e853ec0 Port Homebrew::DevCmd::PrAutomerge 2024-03-21 19:04:31 -07:00
Douglas Eichelberger
d15f99514c Port Homebrew::DevCmd::Livecheck 2024-03-21 19:04:31 -07:00
Douglas Eichelberger
5848c3d81b Port Homebrew::DevCmd::Linkage 2024-03-21 19:04:31 -07:00
Douglas Eichelberger
afaa48bd17 Port Homebrew::DevCmd::Irb 2024-03-21 19:04:31 -07:00
Douglas Eichelberger
0e489a8c04 Port Homebrew::DevCmd::InstallBundlerGems 2024-03-21 19:04:31 -07:00
Douglas Eichelberger
485574ac98 Port Homebrew::DevCmd::GenerateManCompletions 2024-03-21 19:04:30 -07:00
Douglas Eichelberger
7fc20640f2 Port Homebrew::DevCmd::GenerateFormulaApi 2024-03-21 19:04:30 -07:00
Douglas Eichelberger
afceaec076 Port Homebrew::DevCmd::GenerateCaskApi 2024-03-21 19:04:30 -07:00
Douglas Eichelberger
16b93c48e0 Port Homebrew::DevCmd::Formula 2024-03-21 19:04:30 -07:00
Douglas Eichelberger
2f461b1b95 Port Homebrew::DevCmd::Extract 2024-03-21 19:04:30 -07:00
Douglas Eichelberger
2cc70549d8 Port Homebrew::DevCmd::Edit 2024-03-21 19:04:30 -07:00
Douglas Eichelberger
21c84553cf Port Homebrew::DevCmd::DispatchBuildBottle 2024-03-21 19:04:30 -07:00
Douglas Eichelberger
19f9c52652 Port Homebrew::DevCmd::DetermineTestRunners 2024-03-21 19:04:30 -07:00
Douglas Eichelberger
9297a850aa Port Homebrew::DevCmd::Create 2024-03-21 19:04:30 -07:00