1738 Commits

Author SHA1 Message Date
Branch Vincent
7e6be5eb44
shebang: raise error if no rewriting 2022-02-01 00:17:50 -05:00
Nanda H Krishna
a7271f8900
brew style --fix 2022-01-18 21:13:39 -05:00
Mike McQuaid
af6d995de8
dev-cmd/bump: add switch to open pull requests.
This enables the simplification of
https://github.com/Homebrew/actions/blob/master/bump-formulae/main.rb
and exposing this workflow to more Homebrew users.
2022-01-12 17:31:55 +00:00
Mike McQuaid
a9e348ce14
utils/pypi: ensure pipgrip is installed.
Rather than failing if it isn't installed: install it if needed.
2022-01-11 17:12:04 +00: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
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
2e4185a525
Fix brew typecheck 2021-12-24 21:15:21 -05:00
Rylan Polster
2e6b6ab3a2
Fix style 2021-12-24 21:15:21 -05:00
Bob Lail
31a831ae11 Bypass searching for open Issues when failing to install a formula without a tap
Given a formula with a broken build, if you install it locally with `brew install path/to/formula.rb`, when the build fails, Homebrew will attempt to [search for open issues on the tap](073c4177b5/Library/Homebrew/exceptions.rb (L489)); but in this case `formula.tap` is `nil` and `tap.full_name` would raise a `NoMethodError` yielding this output:

```
$ brew install ./erg.rb
Error: Failed to load cask: ./erg.rb
Cask 'erg' is unreadable: wrong constant name #<Class:0x00007fd89b246cd0>
Warning: Treating ./erg.rb as a formula.
==> Downloading https://github.com/square/erg/archive/v1.1.1.tar.gz
Already downloaded: /Users/lail/Library/Caches/Homebrew/downloads/54e3fce84302901d76d50b53aa7fe760cfcf81c9842a232d6b29e771de6ec9c5--erg-1.1.1.tar.gz
Warning: Cannot verify integrity of '54e3fce84302901d76d50b53aa7fe760cfcf81c9842a232d6b29e771de6ec9c5--erg-1.1.1.tar.gz'.
No checksum was provided for this resource.
For your reference, the checksum is:
  sha256 "8dbcff3dfd67b8f6e8f2dfd4f57cf818ce0cd6ce4b52566611e698fc8778507f"
==> go get github.com/square/erg
Last 15 lines from /Users/lail/Library/Logs/Homebrew/erg/01.go:
2021-12-02 16:45:31 +0000

go
get
github.com/square/erg

go: downloading github.com/square/erg v1.2.1
go: downloading vbom.ml/util v0.0.3
go: downloading vbom.ml/util/sortorder v1.0.2
go: downloading github.com/square/grange v0.0.0-20201015231752-48d66acdd125
go: downloading github.com/deckarep/golang-set v0.0.0-20170202203032-fc8930a5e645
go: downloading github.com/fvbommel/sortorder v1.0.1
go: downloading github.com/orcaman/concurrent-map v0.0.0-20160823150647-8bf1e9bacbf6
github.com/square/erg imports
	vbom.ml/util/sortorder: cannot find module providing package vbom.ml/util/sortorder

Do not report this issue to Homebrew/brew or Homebrew/core!

/usr/local/Homebrew/Library/Homebrew/utils/github.rb:64:in `issues_for_formula': undefined method `full_name' for nil:NilClass (NoMethodError)
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:489:in `fetch_issues'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:485:in `issues'
	from /usr/local/Homebrew/Library/Homebrew/exceptions.rb:539:in `dump'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:155:in `rescue in <main>'
	from /usr/local/Homebrew/Library/Homebrew/brew.rb:143:in `<main>'
/usr/local/Homebrew/Library/Homebrew/formula.rb:2306:in `block in system': Failed executing: go get github.com/square/erg (BuildError)
	from /usr/local/Homebrew/Library/Homebrew/formula.rb:2242:in `open'
	from /usr/local/Homebrew/Library/Homebrew/formula.rb:2242:in `system'
	from /Users/lail/Code/homebrew-formulas/erg.rb:13:in `install'
	from /usr/local/Homebrew/Library/Homebrew/build.rb:172:in `block (3 levels) in install'
	from /usr/local/Homebrew/Library/Homebrew/utils.rb:588:in `with_env'
	from /usr/local/Homebrew/Library/Homebrew/build.rb:134:in `block (2 levels) in install'
	from /usr/local/Homebrew/Library/Homebrew/formula.rb:1297:in `block in brew'
	from /usr/local/Homebrew/Library/Homebrew/formula.rb:2472:in `block (2 levels) in stage'
	from /usr/local/Homebrew/Library/Homebrew/utils.rb:588:in `with_env'
	from /usr/local/Homebrew/Library/Homebrew/formula.rb:2471:in `block in stage'
	from /usr/local/Homebrew/Library/Homebrew/resource.rb:126:in `block (2 levels) in unpack'
	from /usr/local/Homebrew/Library/Homebrew/download_strategy.rb:115:in `chdir'
	from /usr/local/Homebrew/Library/Homebrew/download_strategy.rb:115:in `chdir'
	from /usr/local/Homebrew/Library/Homebrew/download_strategy.rb:102:in `stage'
	from /usr/local/Homebrew/Library/Homebrew/resource.rb:122:in `block in unpack'
	from /usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `block in run'
	from /usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `chdir'
	from /usr/local/Homebrew/Library/Homebrew/mktemp.rb:63:in `run'
	from /usr/local/Homebrew/Library/Homebrew/resource.rb:208:in `mktemp'
	from /usr/local/Homebrew/Library/Homebrew/resource.rb:121:in `unpack'
	from /usr/local/Homebrew/Library/Homebrew/resource.rb:96:in `stage'
	from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.8/lib/ruby/2.6.0/forwardable.rb:230:in `stage'
	from /usr/local/Homebrew/Library/Homebrew/formula.rb:2451:in `stage'
	from /usr/local/Homebrew/Library/Homebrew/formula.rb:1290:in `brew'
	from /usr/local/Homebrew/Library/Homebrew/build.rb:129:in `block in install'
	from /usr/local/Homebrew/Library/Homebrew/utils.rb:588:in `with_env'
	from /usr/local/Homebrew/Library/Homebrew/build.rb:124:in `install'
	from /usr/local/Homebrew/Library/Homebrew/build.rb:224:in `<main>'
```
2021-12-02 10:56:44 -06:00
Bo Anderson
c6ca375d5a
utils/ruby.sh: fix error with older Bash
Fixes #12472.
2021-12-02 02:14:11 +00:00
XuehaiPan
d1aac8857a tests/utils/git_spec: update tests for ensure_formula_installed! 2021-11-24 00:30:26 +08:00
XuehaiPan
3376479e95 utils: add method ensure_formula_installed! 2021-11-23 22:48:39 +08:00
Mike McQuaid
07f14c32e9
Merge pull request #12423 from FnControlOption/deps
deps: add `--graph` and `--dot` switches
2021-11-17 10:49:19 +00:00
fn ⌃ ⌥
a188215d69 deps: minor refactoring 2021-11-16 08:45:59 -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
Mike McQuaid
762b35bbc8
Merge pull request #12438 from carlocab/actions-annotations
utils/github/actions: support notices and new annotation parameters
2021-11-16 12:10:30 +00:00
Carlo Cabrera
6795a88520
utils/github/actions: support notices and new annotation parameters
GitHub Actions annotations also suport a "notice" annotation type. You
can also set the title of an annotion, and the set `endLine` and
`endColumn` parameters.

See https://docs.github.com/en/actions/learn-github-actions/workflow-commands-for-github-actions
2021-11-16 14:44:43 +08:00
fn ⌃ ⌥
dddce0de74 Style fixes 2021-11-15 10:49:07 -08:00
fn ⌃ ⌥
e6e730f49d update-python-resources: skip dependencies of excluded packages 2021-11-14 03:52:44 -08:00
XuehaiPan
50cde98fd3 utils/shfmt.sh: allow single line if blocks 2021-11-12 19:57:32 +08:00
XuehaiPan
391e7e22f8 utils/shfmt.sh: add != and =~ to within test regex 2021-11-12 19:57:28 +08:00
XuehaiPan
2345a34095 utils/shfmt.sh: rename regex variables 2021-11-12 19:29:09 +08:00
Caleb Xu
333f44f84e
github: use system_command when pushing bump PR 2021-11-10 12:42:14 -05:00
EricFromCanada
093e6e11da
svn: add flags if needed for :trust_cert or remote_exists? 2021-11-09 13:56:40 -05:00
Bo Anderson
d0f6f7d52b
Require Ruby 2.6.8 2021-11-08 18:39:21 +00:00
XuehaiPan
0331cbeda3 utils/shfmt.sh: use utils/shfmt.sh as shell script formmatter 2021-11-08 20:57:52 +08:00
EricFromCanada
c952ea7358
bump: fix tests 2021-10-25 15:55:11 -04:00
Rylan Polster
fa4bb7d74a
Refactor audit exception handling 2021-10-21 21:11:05 -04:00
Bo Anderson
2d539bc6af
utils/curl: don't use --cookie-jar to enable cookie engine
Fixes #12293.
2021-10-21 22:52:20 +01:00
Bevan Kay
55d9e88a14
Mirror --write-only behaviour to cask, fix incorrect arg reference 2021-10-20 22:40:08 +11:00
Mike McQuaid
9b5f191db1
Merge pull request #12236 from knksmith57/support-custom-google-analytics-id-override
feat: support user-configured Google Analytics reporting
2021-10-20 10:42:03 +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
Kyle Smith
7866a4b586 feat: support user-configured Google Analytics reporting
Allow users to set a custom Google Analytics tracking ID to report user behaviour
via new environment variable: $HOMEBREW_ADDITIONAL_GOOGLE_ANALYTICS_ID.

If provided, this tracking ID will be used _in addition to_ the default tracking
ID used by <https://brew.sh/analytics/>.
2021-10-19 10:49:43 -05:00
Bevan Kay
70ac4d70d2
audit: extend cloudflare https audit exception regex 2021-10-11 15:52:37 +11:00
Bo Anderson
c6d27823ea
Merge pull request #12206 from Bo98/vendor-gems-fix
utils/git: remove external dependency loading
2021-10-07 17:41:22 +01:00
Xuehai Pan
2d89e7d24e
utils/shfmt.sh: apply suggestions from code review
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2021-10-07 22:16:57 +08:00
Bo Anderson
36a57aa738
utils/git: remove external dependency loading 2021-10-07 14:51:52 +01:00
XuehaiPan
3113bf7158 utils/shfmt.sh: redirect differences to stderr 2021-10-07 19:48:53 +08:00
XuehaiPan
735eb78601 utils/shfmt.sh: success with auto-fixable changes on brew style --fix 2021-10-07 19:43:03 +08:00
Mike McQuaid
7ec024e090
utils/git: require formula.
This is currently causing `brew vendor-gems` to fail.
2021-10-07 11:23:55 +01:00
Mike McQuaid
96e060056f
Merge pull request #12196 from Rylan12/release-notes-api
Use GitHub API to generate release notes
2021-10-07 11:22:21 +01:00
Carlo Cabrera
7dabb465b3
system_config: don't print path to curl shim
See discussion at #12191.
2021-10-06 23:58:04 +08:00
Rylan Polster
4f1bbf003a
Use GitHub API to generate release notes 2021-10-05 14:43:17 -04:00
Bo Anderson
03a72760ef
utils/curl: add comment detailing options handling 2021-10-05 13:24:29 +01:00
Bo Anderson
c6cddacc5e
utils/curl: fix false flag handling 2021-10-04 18:17:00 +01:00
Bo Anderson
73a1ff82d2
utils/curl: fix flag handling 2021-10-04 17:44:51 +01:00
Bo Anderson
ebc0783c5f
Merge pull request #12167 from Bo98/brewed-curl-old-macos
Install and use Homebrew's `ca-certificates` on macOS <= 10.15.5
2021-10-04 05:29:57 +01:00
Bo Anderson
30b24cf4ad
Use HOMEBREW_CURL universally, including formulae 2021-10-04 02:03:04 +01:00
Bo Anderson
1952d27ba2
Install and use Homebrew's ca-certificates on macOS <= 10.15.5 2021-10-03 17:52:10 +01:00