4561 Commits

Author SHA1 Message Date
Mike McQuaid
d48a9337e4
Revert "update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on." 2022-02-28 09:54:12 +00:00
Mike McQuaid
16bdd42308
cask/dsl/version_spec: remove deprecated specs.
No idea why these didn't fail before now?
2022-02-25 15:26:37 +00:00
Mike McQuaid
7ec6d41a1d
Revert "formula: remove OnOS." 2022-02-24 12:31:32 +00:00
Mike McQuaid
dd8a245158
Merge pull request #12910 from Homebrew/update_report_only_installed_default
update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on.
2022-02-24 08:46:08 +00:00
Mike McQuaid
73951a01fc
formula: remove OnOS. 2022-02-22 10:19:09 +00:00
Mike McQuaid
10d5266361
update-report: default HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED to on.
This avoids reading formula files that the user hasn't explicitly
installed which both speeds up `brew update` and improves the security.
2022-02-22 10:01:24 +00:00
Mike McQuaid
249bc2136a
Merge pull request #12837 from NickHackman/service-launch-only-once
service: launch only once
2022-02-14 09:17:44 +00:00
NickHackman
53d37cc84c service(systemd): launch_only_once test 2022-02-12 17:26:21 -05:00
NickHackman
9f4949c8c6 service: LaunchOnlyOnce plist test 2022-02-11 14:46:47 -06:00
Rylan Polster
e5e4c288be
Cleanup brew style --fix suggestions 2022-02-11 10:45:51 -05:00
Josh Soref
37fd64b5a3 formula_auditor: new formulas should not define a revision
Logically new formulas should start at revision 0, but a
developer might use an existing formula as a template and
otherwise not realize they should remove this field.

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
2022-02-09 13:14:10 -05:00
Niklas Higi
00f209e16e
Recommend interactive usage of fish_add_path
Since the `fish_add_path` command modifies a universal Fish variable
(which is automatically persisted to a file) it's unnecessary to run it
again every time a new shell is opened.
2022-02-05 16:29:09 +01:00
Carlo Cabrera
2b60a99d4a
Revert "shebang: raise error if no rewriting"
This is causing failures when attempting to rewrite shebangs during the
cleanup stage of `brew install`.

See, for example, Homebrew/homebrew-core#94323,
Homebrew/homebrew-core#94321.

This reverts commit 7e6be5eb4474ed9eaa4b8e9a5a45e3340186840c.
2022-02-02 20:44:03 +08:00
Carlo Cabrera
f05e57f414
Merge pull request #12823 from carlocab/setuptools-audit
rubocops/text: remove `setuptools` audit
2022-02-01 16:57:57 +08:00
Mike McQuaid
955292d666
Merge pull request #12820 from branchvincent/shebang
shebang: raise error if no rewriting
2022-02-01 08:37:34 +00:00
Carlo Cabrera
bc67c05528
rubocops/text: remove setuptools audit
This currently no longer applies, because we might sometimes need an
older `setuptools` than the one shipped with a Python formula.

This is needed for Homebrew/homebrew-core#93964.
2022-02-01 15:26:50 +08:00
Branch Vincent
7e6be5eb44
shebang: raise error if no rewriting 2022-02-01 00:17:50 -05:00
Roland Crosby
d8df9c2ee9 Allow cargo build --lib
When building Rust packages that provide libraries but no executable
binaries, `cargo install` doesn't do anything; you need to use `cargo
build` and install any libraries manually. See e.g.
rust-lang/cargo#8294.

Unfortunately, Homebrew's Rubocop "use cargo install *std_cargo_args"
rule, as currently written, blocks all invocations of `cargo build`.
This commit changes that rule to exclude invocations of `cargo build`
that use the `--lib` argument (`--lib` specifies to Cargo that a
package's library targets should be built). This will enable library
packages to be built while retaining the "use cargo install
*std_cargo_args" message for the more common case when a Rust package
provides executable binaries.
2022-01-31 21:11:22 -05:00
Mike McQuaid
0b9df6db62
test/cmd/services_spec: fix test.
Was broken by https://github.com/Homebrew/homebrew-services/pull/443
2022-01-21 13:52:22 +00:00
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