225 Commits

Author SHA1 Message Date
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
XuehaiPan
43377a3e5e style: fix inconsistent code style for shell scripts by runing brew style --fix 2021-09-16 01:08:02 +08:00
XuehaiPan
bd8db0737d style: fix inconsistent code style for shell scripts 2021-09-16 01:06:19 +08:00
XuehaiPan
3f96d963f7 style: fix inconsistent code style for shell scripts 2021-09-15 14:59:01 +08:00
Rylan Polster
5d536d66fc
Rename HOMEBREW_JSON_CORE to HOMEBREW_INSTALL_FROM_API 2021-08-27 00:24:15 -04:00
Rylan Polster
99635bf3ae
Remove need for homebrew/cask to be tapped 2021-08-14 16:17:26 -04:00
Rylan Polster
a0f7711ab6
update: don't update homebrew/core for preinstall if using JSON 2021-07-14 02:13:23 -04:00
Gautham Goli
e4118bc4ca Fix shellcheck style errors 2021-05-18 17:10:20 +05:30
hyuraku
740cf7b6a1 cmd/update.sh: repair bash style 2021-05-06 10:03:16 +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
Darren Kavanagh
40d09f59b6
Replace tab with spaces and align indent 2021-03-18 11:31:42 -07:00
Darren Kavanagh
b66b461811
Expand quiet checks in update and update-report 2021-03-13 10:08:06 -08:00
Rylan Polster
84fc16c1c1
Apply suggestions from code review
Co-Authored-By: Mike McQuaid <mike@mikemcquaid.com>
2021-01-28 09:10:14 -05:00
Rylan Polster
f508f8dc0c
update: show message prompting brew tap --repair
This message is shown when a fetch fails due to a branch rename
2021-01-28 09:10:13 -05:00
EricFromCanada
6fc116318e fixes for grammar and wording 2021-01-26 16:19:47 -05:00
EricFromCanada
a427de5bee capitalization fixes
"curl" is the binary, while "cURL" is the umbrella project.
2021-01-26 15:36:44 -05:00
Viktor Szakats
89eecedbbb
cmd/update: suppress curl warning in certain envs
Specifically the warning:
`Failed to set filetime <unixtime> on outfile: Operation not permitted`
when the user's `.curlrc`  contains `--remote-time` and the server 
returned a `Last-Modified:` header, like in case of the GitHub API.
2021-01-25 19:58:41 +01: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
Rylan Polster
34a88a3bb0 update: add notice that unshallowing takes time 2020-12-28 17:18:27 -05:00
J Rob Gant
54546c5f8f
Update Library/Homebrew/cmd/update.sh
Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
2020-12-11 19:27:54 -05:00
J Rob Gant
68e2e48b63
Update the variable names 2020-12-11 12:47:47 -05:00
J Rob Gant
e0c1f9d9d1
Better newlines 2020-12-11 12:43:23 -05:00
J Rob Gant
290179091a
If the eariler code produced multiple messages I wouldn't have complained. 2020-12-10 13:22:15 -05:00
J Rob Gant
e084ba762c
fix typo 2020-12-10 11:20:46 -05:00
J Rob Gant
91df36e67c
Check for both shallow clones at the same time. 2020-12-10 11:14:30 -05:00
Mike McQuaid
9d90ef29eb
cmd/update: improve shallow clone message. 2020-12-07 15:23:08 +00:00
Mike McQuaid
10e73164f0
update.sh: refuse to update shallow homebrew-core/cask clones.
GitHub has requested this as these are extremely expensive operations.
2020-12-03 08:42:09 +00:00
Maxim Belkin
2aecfe60fc Update logic that handles HOMEBREW_GIT_PATH. 2020-11-25 16:08:57 -06:00
Maxim Belkin
c3231a4095
Apply Mike's suggestions
Co-authored-by: Mike McQuaid <mike@mikemcquaid.com>
2020-11-25 12:54:18 -06:00
Mike McQuaid
fd08ffdd67
cmd/update.sh: update Git logic.
Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
2020-11-25 08:44:40 +00:00
Maxim Belkin
82ad6a56e9
Address review comments. 2020-11-24 21:01:22 -06:00
Maxim Belkin
7c4b1841bc
Use set -e/set +e instead of odie 2020-11-20 18:02:22 -06: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
Mike McQuaid
2bdf3deb6f
Reduce shallow clone usage
GitHub has requested we request our usage of shallow clones. As a
result:

- do default to shallow clones on CI
- do not do --shallow-since when setting up new repositories in
  `brew update`
- do not support shallow clones of homebrew-core at all

We may consider in future unshallowing all clones unconditionally.
2020-10-09 09:57:04 +01:00
shcai97
1789c27b32
use --key and --numeric-sort
Co-authored-by: Maxim Belkin <maxim.belkin@gmail.com>
2020-09-09 10:21:46 +08:00
shcai97
77f2a24a6b use sort to fix latest_tag 2020-09-09 01:12:58 +08:00
shcai97
249e8e29f9 fix latest_tag in homebrew/brew update 2020-09-08 10:41:45 +08:00
Mike McQuaid
0be15fc4b7
Run brew update before brew bundle.
This should help with cases like
https://github.com/Homebrew/homebrew-bundle/issues/751
and is good practise in general.

Also, document the `brew update --preinstall` flag that is being used
here so others can run it manually e.g. as part of CI if needed.
2020-07-28 11:49:52 +01:00
Caleb Xu
a53c92bd7f Cache commands list for faster shell completions 2020-06-18 11:06:31 -04:00
Shaun Jackman
b5584fc035 update: Update the symbolic ref origin/HEAD 2020-06-16 23:20:04 -07:00
Maxim Belkin
328c75fc33
Move logic related to HOMEBREW_RUBY_PATH to utils/ruby.sh 2020-05-15 10:30:45 -05:00
Maxim Belkin
1cba5821fd
cmd/update.sh: define conditions for unsetting HOMEBREW_RUBY_PATH 2020-05-12 11:50:12 -05:00
Maxim Belkin
9124e07b54
cmd/update.sh: keep HOMEBREW_RUBY_PATH set when updating 2020-05-11 10:47:03 -05:00
Mike McQuaid
3381cbf5c7
Use Homebrew::EnvConfig. 2020-04-07 09:58:26 +01:00
Mike McQuaid
79bc4f1136
update: make git rebase quiet on Mojave system Git.
Fix regression from https://github.com/Homebrew/brew/pull/7260.

This code makes me sad.
2020-04-03 08:59:11 +01:00
Mike McQuaid
fe5717519c
update: make rebase quiet.
I tested the workaround with the newest Git and the Catalina system Git
and it wasn't needed in either case. We can re-add it if we get
complaints with supported Git versions.

Fixes https://github.com/Homebrew/brew/issues/7259
2020-04-02 09:00:25 +01:00
Mike McQuaid
59958777c1
update: allow setting Git name and email.
This is needed for `brew test-bot` when no global Git configuration is
present.
2020-02-12 20:00:14 +00:00
Mike McQuaid
2f39057243
Improve handling of *_GIT_REMOTE env vars
- Output a message whenever a non-default remote is set.
- Ensure that `CoreTap.instance.install` uses the right remote.
2020-01-13 09:43:02 +00:00