212 Commits

Author SHA1 Message Date
Alexander Bayandin
7aacda1754
formula: add fuzzy_search method 2021-06-22 18:06:52 +01:00
Gautham Goli
e4118bc4ca Fix shellcheck style errors 2021-05-18 17:10:20 +05:30
hyuraku
67c5006b0a cmd/shellenv.sh: repair style and set HOMEBREW_CASK_REPOSITORY 2021-04-28 20:47:39 +09:00
Mike McQuaid
7af68d0f8e
Fix shellcheck failures
A new version of `shellcheck` (I think?) brought us so new warnings and
errors.

To fix:
- pass `--source-path` so we don't need to stop `shellcheck` trying to
  read sourced files every time
- disable some more warnings/errors we don't care about fixing
2021-04-22 13:18:44 +01:00
hyuraku
117902803f add detail comments and delete cask 2021-04-17 20:34:16 +09:00
hyuraku
83f8b9230a brew.sh: repair style 2021-04-16 22:32:30 +09:00
Bo Anderson
7c9053753f
brew.sh: add workaround for old auto-updates 2021-04-16 12:32:34 +01:00
Bo Anderson
ad22854bcb
brew.sh: remove problematic HOMEBREW_BOTTLE_DOMAIN export
Partially fixes #11123.
2021-04-13 03:54:32 +01:00
Mike McQuaid
bf199cf271
Default Homebrew on Linux to use GitHub Packages. 2021-04-09 09:17:25 +01:00
Mike McQuaid
a2251a16ff
Default download to GitHub Packages
Now that all bottles (without existing `sha256` mismatches) have been
uploaded to GitHub Packages make it the default download location.

Will give this a few days testing before we make a tag and make this
default for everyone.

No migration has been done for Linuxbrew packages yet; those will be
done after we have fully migrated over Homebrew.
2021-04-08 11:33:03 +01:00
Bo Anderson
5660a1bf13
brew.sh: HOMEBREW_SIMULATE_MACOS_ON_LINUX implies HOMEBREW_FORCE_HOMEBREW_ON_LINUX 2021-03-05 12:22:27 +00:00
Mike McQuaid
cca1413bf2
Merge pull request #10764 from Bo98/export-env
Let bin/brew handle its own exporting
2021-03-04 15:43:33 +00:00
Mike McQuaid
dc1fdc9f8d
Speedup brew --version.
Port `brew --version` to Bash to speed it up.

While we're here:
- remove (now) unused `Tap` Git methods
- use `--quiet` instead of `-q` to be more verbose

Benchmarks:
```
$ hyperfine --min-runs=3 --warmup=2 "git checkout origin/master; brew --version" "git checkout speedup_brew_version; brew --version"
Benchmark #1: git checkout origin/master; brew --version
  Time (mean ± σ):      2.083 s ±  0.004 s    [User: 396.8 ms, System: 597.2 ms]
  Range (min … max):    2.080 s …  2.088 s    3 runs

Benchmark #2: git checkout speedup_brew_version; brew --version
  Time (mean ± σ):     847.9 ms ±  35.2 ms    [User: 100.0 ms, System: 247.9 ms]
  Range (min … max):   824.1 ms … 888.3 ms    3 runs

Summary
  'git checkout speedup_brew_version; brew --version' ran
    2.46 ± 0.10 times faster than 'git checkout origin/master; brew --version'
```
2021-03-04 12:59:42 +00:00
Bo Anderson
0a4fd2201e
Let bin/brew handle its own exporting 2021-03-02 16:59:57 +00:00
Bo Anderson
40f3fb9c55
Revert "Temporarily change default Bintray domain" 2021-03-01 00:19:38 +00:00
Bo Anderson
ff367939ce
Temporarily change default Bintray domain 2021-02-28 18:01:41 +00:00
Bo Anderson
1fba9b9b53
Prevent loading all non-Bundler gems 2021-02-26 18:23:48 +00:00
Mike McQuaid
ca47b47f77
Speedup brew --prefix <formula>
This case is _really_ slow even although it's something we encourage
people to run often and build systems often do. The `brew --prefix`
case is really fast because it's just in Bash so: let's pull the
`brew --prefix <formula>` case into Bash too.

This doesn't handle any edge-cases like `--installed` and the formula
detection is pretty simple.

Also, to make this behaviour consistent, never output `Cellar` paths
from the (Ruby) `brew --prefix`; we never want people relying on the
Cellar paths anyway, only output them if the formula wasn't installed
(where, arguably, using a Cellar path is even worse) and the speedup is
worth this deviation in behaviour.
2021-02-25 17:07:28 +00:00
Mike McQuaid
f55b80a9a4
Revert "Enable HOMEBREW_BOOTSNAP for developers" 2021-02-25 11:06:50 +00:00
Mike McQuaid
22fb25d96d
Enable HOMEBREW_BOOTSNAP for developers
- Enable it by default if you've run a developer command or set
  `HOMEBREW_DEVELOPER`.
- Clarify the documentation that there's various configuration in which
  it doesn't work.

I've rolled this out of most of GitHub's developers with no ill effects
and we've enabled it in both CI and for various maintainers so it feels
appropriate to have a bigger rollout.
2021-02-23 09:35:21 +00:00
Rylan Polster
26722647c3
Set default ruby warning level to -W1 2021-02-12 14:50:50 -05:00
EricFromCanada
a427de5bee capitalization fixes
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
EricFromCanada
a72ddfdc67 remove duplicate "Error" in onoe/odie arguments 2021-01-26 15:36:43 -05:00
Rylan Polster
be02591cb6
Add brew release command 2021-01-21 18:29:43 -05:00
Mike McQuaid
e2f998d3e6
Move HOMEBREW_AUTO_UPDATE_SECS default definition
This ensure it'll always be set to a value.

Fixes https://github.com/Homebrew/brew/issues/10386
2021-01-21 13:19:06 +00:00
Mike McQuaid
30d5fc6285
Merge pull request #10259 from kidonng/cask-completion
Add brew casks command
2021-01-08 13:04:53 +00:00
Mike McQuaid
8af4895479
Improve submitted analytics data
- Use default `custom-prefix` label on macOS ARM (as `/usr/local` is
  not the default).
- Add architecture (or Rosetta) to analytics event label.
- Don't send minor versions on Big Sur.
- Remove defunct `HOMEBREW_OSX_VERSION` reference.
2021-01-07 09:28:40 +00:00
Kid
98c968ea2f Add brew casks command 2020-12-30 10:55:26 +08:00
Maxim Belkin
45d67ef13e
brew.sh: define minimum required Glibc version 2020-12-24 09:10:53 -06:00
Nick Morgan
77e063d4a6
Fixing xcode-select --switch command line option 2020-12-16 21:33:20 -05:00
Mike McQuaid
adab0fbb41
cleanup: fix portable Ruby behaviour.
Better match the macOS behaviour in `ruby.sh`.

Fixes #9469
2020-12-09 11:50:45 +00:00
Mike McQuaid
179459347a
brew.sh: don't allow system Ruby on Catalina.
It's (far) too broken for our purposes.

Fixes https://github.com/Homebrew/brew/issues/9410
2020-12-07 11:52:44 +00:00
Francois-Xavier Coudert
961f4cc14f brew: re-exec under native arch if requested 2020-12-04 18:03:24 +01:00
Mike McQuaid
844efe591f
Merge pull request #9213 from maxim-belkin/handle-curl-git-better
Properly handle outdated cURL
2020-11-26 09:09:20 +00:00
Mike McQuaid
6f4d2a9dcd
brew.sh: remove trailing period. 2020-11-26 08:35:42 +00:00
Maxim Belkin
2aecfe60fc Update logic that handles HOMEBREW_GIT_PATH. 2020-11-25 16:08:57 -06:00
Maxim Belkin
2b6c1e220d
brew.sh: don't mention HOMEBREW_DEVELOPER 2020-11-24 20:51:49 -06:00
Eric Knibbe
45ed865008
bump-cask-pr: run auto-update beforehand 2020-11-22 20:12:21 -05:00
Michka Popoff
4e1e280ace brew.sh: remove HOMEBREW_DEVELOPER condition
This env variable is filtered out on test-bot.
2020-11-22 00:06:32 +01:00
Michka Popoff
75e55def94 brew.sh: add missing quotes 2020-11-21 22:48:20 +01:00
Michka Popoff
3f84af72b1
Merge pull request #9230 from iMichka/curl
brew: lower curl minimum version for debian 7 CI
2020-11-21 16:20:05 +01:00
Michka Popoff
dbb81dbe7e brew: lower curl minimum version for debian 7 CI
We do not use curl that much there, setting the HOMEBREW_ON_DEBIAN7 flag
allows to lower the version, so that we can successfully pass the curl
version check below.
2020-11-20 21:19:37 +01:00
Mike McQuaid
2832048692
brew.sh: cleanup indentation. 2020-11-20 12:34:21 +00:00
metacollin
e5f7285260 Removed plural alias 2020-11-19 20:24:07 -07:00
Maxim Belkin
22bc5a94e7
Properly handle outdated cURL
`HOMEBREW_CURL_PATH` has an effect only when `HOMEBREW_DEVELOPER` is set. However, the part of `brew.sh` that prints a message about outdated cURL disregards the value of `HOMEBREW_DEVELOPER`, which leads to a misleadnig message telling the user that `HOMEBREW_CURL_PATH` is outdated even though another cURL was used/tested.

This PR fixes it and instructs Homebrew to:

1. Display a warning message when system cURL is outdated and either `HOMEBREW_CURL_PATH` **or `HOMEBREW_DEVELOPER`** are not set. New `HOMEBREW_CURL_WARNING` variable is set to display the above warning only once (useful when `brew` calls itself internally).
2. Display `Installing Homebrew cURL` before auto-installing cURL in `update.sh` (due to `HOMEBREW_FORCE_BREWED_CURL`) and stop/exit if this step fails.
3. Display `Installing Homebrew Git` before auto-installing Git in `update.sh` (due to `HOMEBREW_FORCE_BREWED_GIT`) and stop/exit if this step fails.
2020-11-19 10:14:10 -06:00
metacollin
b04a5ffa0b Turbocharged formula name completion 2020-11-13 05:36:53 -07:00
Mike McQuaid
7bbc159450
brew.sh: reorder to speedup shellenv.
Reorder and restructure this file to make it as fast as possible for
e.g. `brew --prefix`. Once we have that, also give `brew shellenv`
short-circuit command execution to make it as fast as possible.

On my machine (with a warm cache) this gets:

```
brew shellenv  0.01s user 0.03s system 100% cpu 0.038 total
```

Compared to:

```
brew shellenv  0.09s user 0.19s system 100% cpu 0.277 total
```

before this commit.
2020-10-12 09:23:49 +01:00
Maxim Belkin
b1cc9bdee7
brew.sh: update implied HOMEBREW_VERSION
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-09-09 12:05:40 -07:00
Maxim Belkin
56901775bf brew.sh: use HOMEBREW_GIT instead of git 2020-09-09 12:22:45 -05:00
Dawid Dziurla
1863b85dbe
brew.sh: fix indentation
Co-authored-by: Markus Reiter <me@reitermark.us>
2020-08-25 12:15:08 +02:00