4342 Commits

Author SHA1 Message Date
Adrian Ho
af4955adfc dev-cmd/bottle: clean up intermediate tar
Otherwise Cellar gets cluttered.

Fixes https://github.com/Homebrew/brew/issues/12744.
2022-01-18 15:58:35 +08:00
Mike McQuaid
3ba6afb1d3
Merge pull request #12648 from bevanjkay/cask-comma-separator-style
rubocops (cask/url): add rubocop to use csv instead of before|after_comma
2022-01-12 13:48:54 +00:00
Bevan Kay
d371547d5a
fix tests 2022-01-12 10:39:38 +11:00
Bevan Kay
6f62b0e029
add tests 2022-01-11 13:18:06 +11:00
Rylan Polster
feb93167ad
Rename and fix Formatter:wrap to Formatter.format_help_text 2022-01-08 23:13:08 -05:00
Mike McQuaid
b09f421027
repology: always use Homebrew curl.
This seems to be required even with TLSv1.3 support now.

Also, while we're here, improve the error handling/output.
2022-01-03 13:17:12 +00:00
Bevan Kay
d5448ff54a
rubocops (cask/url): add rubocop to use csv instead of before_comma and after_comma in cask 2021-12-31 11:08:47 +11:00
Mike McQuaid
36e9e45c54
Merge pull request #12643 from Homebrew/dependabot/bundler/Library/Homebrew/rubocop-performance-1.13.0
build(deps): bump rubocop-performance from 1.12.0 to 1.13.0 in /Library/Homebrew
2021-12-29 13:33:04 +00:00
Mike McQuaid
510bc25db6
brew style -fix 2021-12-29 13:07:39 +00:00
Steve Peters
d53dab62c9
bump-revision: add --remove-bottle-block option
This removes a bottle block for the specified formulae
while bumping the revision.
2021-12-26 03:42:39 -08:00
Rylan Polster
2e6b6ab3a2
Fix style 2021-12-24 21:15:21 -05:00
FX Coudert
48f772c585
Add new CPUs to test 2021-12-19 09:27:08 +01:00
Sam Ford
bd4124c10f
Livecheck: Avoid duplicate URLs
Some formulae/casks contain duplicate checkable URLs or contain
URLs that become duplicates after `#preprocess_url` is used. With
the former, a formula's `stable` and `head` URLs can be the same if
they both use the Git repository. With the latter, a formula's
`homepage` and `stable` URLs are different but `#preprocess_url` can
return the same Git repository URL for each (which can also be
a duplicate of the `head` URL).

The `fabric-completion` formula is a worst case scenario, as it
contains both of these conditions but the repository has no tags.
By default, livecheck would needlessly check the repository three
times (i.e., no versions are found so livecheck tries the next URL,
which happens to be the same URL).

This commit avoids duplicate URLs in `#checkable_urls` and keeps
track of checked URLs in `#latest_version` to avoid a duplicate
caused by `#preprocess_url`. This should effectively resolve the
issue of checking the same URL more than once for a given
formula/cask. Checking the same URL only once across all the
formulae/casks in a given livecheck run will be handled in a later
commit (though I've done most of the groundwork already in previous
PRs).
2021-12-14 10:31:15 -05:00
Rylan Polster
7656c09184
Only check for Rosetta on macOS 2021-12-05 13:03:38 -05:00
Nipunn Koorapati
30c4663066 Fix analytics string to test for CI 2021-12-04 12:29:31 -05:00
Rylan Polster
b58551cd67
Control for CPU type and Rosetta in os_arch_prefix_ci tests 2021-12-03 22:29:10 -05:00
Nipunn Koorapati
e2fc14b0b7 Fix analytics_spec.rb test to pass when run from M1 2021-12-03 20:14:17 -05:00
Sean Molenaar
302975829d
service: add basic cron support 2021-11-30 14:29:22 +01:00
Sean Molenaar
4cb8afeeef
service: add timer support for systemd 2021-11-30 11:05:11 +01:00
EricFromCanada
ed3042c37a
livecheck: use brewed curl if called for by download URL 2021-11-28 12:57:24 -05:00
XuehaiPan
d1aac8857a tests/utils/git_spec: update tests for ensure_formula_installed! 2021-11-24 00:30:26 +08:00
Sam Ford
9e8900fb6e
Allow regex to be passed into all strategy blocks
This modifies cask-related livecheck strategies to allow passing a
regex into a `strategy` block, when appropriate. These strategies
were outliers that explicitly rejected a regex even if a `strategy`
block was used, forcing any regex to be inlined in the `strategy`
block (instead of being defined using `#regex`).

With these changes, all `strategy` blocks will be able to accept a
regex, further simplifying the mental model. This also helps to
better align the various `find_versions` and `versions_from_*`
methods across strategies.
2021-11-19 23:58:54 -05:00
Mike McQuaid
f1121fc65a
Merge pull request #12445 from FnControlOption/csv
cask: add `#csv` to version DSL
2021-11-17 12:17:45 +00:00
fn ⌃ ⌥
68160df041 cask: add #csv to version DSL 2021-11-16 16:34:12 -08:00
Carlo Cabrera
105d1f9cfc
utils/github/actions: make file a mandatory argument
An annotation is pretty useless if you don't specify a file to place the
annotation on, so let's just require it.
2021-11-16 23:42:03 +08:00
Caleb Xu
227b8148eb
system_command: redact secrets in stdout/stderr
We already redact secrets when printing the command-line invocation
itself. Make sure that stdout/stderr doesn't leak secrets either.
2021-11-10 10:36:16 -05:00
Rylan Polster
ee898b1309
Fix tests 2021-11-08 20:18:25 -05:00
Sean Molenaar
ca7623c70f
Merge pull request #12367 from SMillerDev/feature/service/interval
Service: add interval support
2021-11-08 16:24:19 +01:00
Sean Molenaar
25bc1d8860
Service: add interval support 2021-11-06 13:18:58 +01:00
Bo Anderson
4836ea0ba2
Remove XQuartz handling 2021-11-05 12:40:22 +00:00
Sam Ford
94bf67b5df
Merge pull request #12314 from samford/livecheck/apache-support-dlcdn-urls
Apache: Support additional mirror/backup URLs
2021-11-03 11:55:54 -04:00
Sam Ford
77273fe2b3
Cask::Audit: Handle referenced cask in livecheck
`Cask::Audit#check_livecheck_version` was never updated to handle
a referenced cask in a `livecheck` block (e.g., `cask "other-cask"`).
As a result, this audit will wrongly give an error like `Version
'1.2.3' differs from '' retrieved by livecheck.` in this scenario.

This commit ensures that a referenced cask is handled by the audit
and it won't error when the referenced check provides a good version.
2021-11-02 12:32:38 -04:00
Sam Ford
a1277ee1b0
Apache: Support additional mirror/backup URLs 2021-11-01 15:58:04 -04:00
Sean Molenaar
ef6d3dcede
Merge pull request #11910 from SMillerDev/feature/caveats/linux_services
Caveats: suggest brew services for linux
2021-11-01 15:13:25 +01:00
fn ⌃ ⌥
aa6f10ff35 install, upgrade: fetch each formula only once 2021-10-31 10:52:40 -07:00
Sean Molenaar
73bc934c85
Caveats: suggest brew services for linux 2021-10-30 18:18:25 +02:00
Bo Anderson
572c7cd179
formula: make each instance have separate spec references
This fixes SoftwareSpec#owner being mixed up if there are multiple formula references.
This in turn fixes --force-bottle not working in some scenarios like `brew reinstall`.
2021-10-26 15:03:33 +01:00
EricFromCanada
c952ea7358
bump: fix tests 2021-10-25 15:55:11 -04:00
Rylan Polster
9ca0f68bf7
Fix tests 2021-10-21 21:11:06 -04:00
Bo Anderson
c6b287590d
Merge pull request #12288 from carlocab/ruby-diagnostic
extend/os/mac/diagnostic: fix unqualified macOS version reference
2021-10-21 15:34:21 +01:00
Sam Ford
8ce6059544
Gnu: Update generated URL to use HTTPS 2021-10-21 09:28:54 -04:00
Carlo Cabrera
b040775e16
Fix diagnostic_spec
The test case needs to be adjusted for the new diagnostic output.
2021-10-21 21:05:51 +08:00
Sam Ford
e709917cd5
Apache: Extend URL_MATCH_REGEX
Some Apache URLs use a `filename` query string parameter instead of
`path` and the `Apache` strategy isn't applied. The parameter value
is the same as `path` (i.e., a path to a file), so this updates the
strategy's `URL_MATCH_REGEX` to handle this URL format as well.
2021-10-20 10:52:49 -04:00
Mike McQuaid
b77b08cf00
Merge pull request #12121 from EricFromCanada/restore-repology
bump: add `--start-with` option to retrieve a subset of results
2021-10-20 09:02:48 +01:00
EricFromCanada
811d0fa0bd
bump: add option to retrieve a subset of results
Plus a few fixes for output.
2021-10-19 20:14:39 -04:00
Mike McQuaid
823f663ab4
Merge pull request #12259 from MikeMcQuaid/next_major_or_minor_release
Deprecations/disables for 3.3.0/4.0.0.
2021-10-19 17:11:42 +01:00
Mike McQuaid
f65d525693
Deprecations/disables for 3.3.0/4.0.0.
Deprecate, disable and remove code for Homebrew 3.3.0 or 4.0.0
(whichever the next release ends up being).
2021-10-19 16:36:42 +01:00
Mike McQuaid
0cda6a0657
Only use patchelf.rb
Remove support for using the `patchelf` formula for writing as it's been
off by default for a long time now.
2021-10-19 15:15:56 +01:00
XuehaiPan
63f2f6cca7 tap: allow to change tap remote with brew tap --custom-remote 2021-10-12 01:11:34 +08:00
Bo Anderson
c46fe273d4
test/dev-cmd/bottle_spec: fix --merge output matching 2021-10-07 15:44:20 +01:00