297 Commits

Author SHA1 Message Date
Bo Anderson
e2aae0fa63
Require Ruby 2.6.10 2023-04-12 13:15:34 +01:00
Mike McQuaid
5631310653
Auto-update from the API less often
Instead of doing so literally whenever we query for a formula, Instead
do so only when we're in an auto-updateable command.

This better fits the existing behaviour while still updating when it's
most important to do so.
2023-03-10 17:53:15 +00:00
Bo Anderson
e86a8c2477
Move HOMEBREW_NO_INSTALL_FROM_API defaults to shell 2023-02-24 21:53:08 +00:00
Bo Anderson
559bec95bc
Scope HOMEBREW_NO_INSTALL_FROM_API to core formulae in brew audit 2023-02-24 13:33:46 +00:00
Mike McQuaid
8d02143c2b
Add generate-{cask,formula}-api commands
These replace the similar scripts in formulae.brew.sh.

Part of #14730.
2023-02-22 15:33:16 +00:00
Bo Anderson
dc286a11ff
Add shell optimisation for --cellar 2023-02-19 05:38:16 +00:00
Mike McQuaid
f39ab585b9
Further adjust HOMEBREW_AUTO_UPDATE_SECS
Add another case to update once an hour when developer commands have
been run.
2023-02-15 17:37:12 +00:00
Mike McQuaid
c5252817c2
analytics: refactor InfluxDB/Google handling. 2023-02-15 16:34:50 +00:00
Mike McQuaid
4c8ed77302
Improve homebrew/{core,cask} autotapping.
Don't automatically tap these when running a developer command that's
not using the API.

Fixes #14606
2023-02-14 09:54:24 +00:00
Mike McQuaid
75a20689b1
Add HOMEBREW_API_AUTO_UPDATE_SECS
This sets the default and allows customising how often we try to
download files from the API.

This does not affect `brew update` as we want to always check every time
on an explicit call.
2023-02-11 07:22:50 +00:00
EricFromCanada
dfc9906184
internal messaging fixes 2023-02-10 23:17:16 -05:00
Mike McQuaid
e301fe8fd8
brew.sh: move shared curl speed limit settings here.
This avoids duplication and potentially allows it to be used for various
other `curl` calls.
2023-02-10 17:27:10 +00:00
Mike McQuaid
cb1872e5bf
Merge pull request #14553 from MikeMcQuaid/4.0.0-changes 2023-02-08 11:05:08 +00:00
Carlo Cabrera
61e82290d7
brew.sh: declare commands that call auto-update as an array
Follow up to #14536.
2023-02-08 02:41:41 +08:00
Mike McQuaid
2a5d41d41b
Revert "Merge pull request #14547 from Homebrew/revert-14412-homebrew_install_from_api_default"
This reverts commit f4e60482791d2ff628efadfdbf0d14d9237d2d29, reversing
changes made to e26784f424061ca16987afcb21e036c66a298492.
2023-02-07 19:25:40 +01:00
Mike McQuaid
1d0779a397
Revert "Merge pull request #14384 from MikeMcQuaid/homebrew_install_from_api_dev"
This reverts commit b8a9fe4d3311bcef26362cddee8dca043f4087e4, reversing
changes made to daf5b276e24d9d41ed8d03fa900d83438121f0c6.
2023-02-07 16:31:47 +01:00
Mike McQuaid
0575903868
Revert "HOMEBREW_INSTALL_FROM_API: make the default for everyone." 2023-02-07 15:13:23 +01:00
Carlo Cabrera
76466f66d2
brew.sh: add bump to HOMEBREW_NO_INSTALL_FROM_API commands
`brew bump` relies on `livecheck`, which we don't want to query the API
for.

Also, some small refactoring:

1. Declare the list of commands we want to set
   `HOMEBREW_NO_INSTALL_FROM_API` for as an array.
2. Only check against this list when the command being run is a
   developer command, to avoid checking the list when we know we're not
   running a dev command.
2023-02-07 14:37:14 +08:00
Rylan Polster
39097583b9
Set HOMEBREW_NO_INSTALL_FROM_API for certain commands 2023-02-06 16:17:04 +01:00
Mike McQuaid
5f6c69bca2
HOMEBREW_INSTALL_FROM_API: make the default for everyone.
- remove all places we check the flag so it's a no-op now
- flip the messaging to refer to `HOMEBREW_NO_INSTALL_FROM_API` where
  relevant
- adjust the documentation
2023-02-05 18:13:08 +01:00
Xuehai Pan
ba3bccf9ed api: download from HOMEBREW_API_DOMAIN 2023-02-04 13:05:20 +00:00
Mike McQuaid
bdbcf094fa
brew.sh: fix HOMEBREW_INSTALL_FROM_API logic.
Ensure that we handle this a bit more correctly so it's unset more often.
2023-02-03 09:59:06 +00:00
Mike McQuaid
46fc4f9f1b
Don't allow HOMEBREW_INSTALL_FROM_API when building from source
When either being in a non-default prefix or being on an unsupported
macOS version we expect most things to be built from source. In that
environment, do not allow HOMEBREW_INSTALL_FROM_API to be set.

Fixes #14475
2023-02-02 14:49:34 +00:00
Dawid Dziurla
e1700178bd
brew.sh: add missing dev-cmd aliases 2023-02-01 13:51:18 +01:00
Mike McQuaid
8e1bcd93f3
brew.sh: test HOMEBREW_INSTALL_FROM_API on developers.
Test `HOMEBREW_INSTALL_FROM_API` on `HOMEBREW_DEV_CMD_RUN` and
`HOMEBREW_DEVELOPER` folks who haven't run a
`HOMEBREW_DEVELOPER_COMMAND`.

The next step after this will be to make this functionality the default
for everyone.
2023-01-20 19:50:42 +00:00
Mike McQuaid
653b349c8b
Change HOMEBREW_INSTALL_FROM_API update frequency
This doesn't need to be nearly as often for HOMEBREW_INSTALL_FROM_API users because we're getting the latest information from the API when needed rather than just at `brew update` time.
2023-01-18 15:11:42 +00:00
Mike McQuaid
a85e1a3e5a
brew.sh: tweak comment. 2023-01-05 09:59:30 +00:00
Asutosh Palai
96449a94e0 restoring the original path after update
This fix is required for ARM Linux where portable Homebrew Portable Ruby is not
available. Without this fix, after auto update, brew is restarted with cleaned up path.
This causes it to pick not find user installed Ruby by RVM or rbenv, causing brew to fail.
2023-01-04 22:23:01 +00:00
Mike McQuaid
40f85af824
brew.sh: fix shellcheck. 2022-12-13 11:37:05 +00:00
Carlo Cabrera
239743f39b
Fix shellcheck error 2022-11-24 22:15:03 +08:00
Carlo Cabrera
cf01a7f985
brew.sh: remove HOMEBREW_CHANGE_ARCH_TO_ARM
We used to need this because the GitHub runner process was running under
Rosetta. GitHub Actions has supported native M1 runners for a few months
now, so I think it's time to remove this.
2022-11-24 22:07:30 +08:00
Bo Anderson
7d7083d0f3
Universally apply Ruby disable options 2022-11-05 01:58:12 +00:00
Bo Anderson
8cb056c657
Remove sitedir from LOAD_PATH 2022-10-24 19:42:49 +01:00
Michka Popoff
354852f848
brew: remove HOMEBREW_ON_DEBIAN7
This is not used anymore, we are building on ubuntu 16.04 for our portable packages: https://github.com/Homebrew/homebrew-portable-ruby
2022-09-28 23:12:58 +02:00
Bo Anderson
a0985191ea
Add messaging for Docker image deprecation 2022-09-07 13:26:08 +01:00
Mike McQuaid
e58d7d3456
brew: improve Docker detection.
Needed for Ubuntu 22.04.
2022-09-06 16:32:35 +01:00
Mike McQuaid
8cb5350d65
Revert "Merge pull request #13447 from notfromstatefarm/feature/support-custom-ssh"
This reverts commit ef00b40a5172d5628a0c861f655a2277fd16a1e0, reversing
changes made to e1fca95836fcb1ad989cd995228192846fc99612.
2022-06-28 09:42:50 +01:00
notfromstatefarm
8d76522be2
remove HOMEBREW_SSH_PATH 2022-06-22 19:22:48 -04:00
notfromstatefarm
540313f18b
support custom git SSH binaries 2022-06-22 19:22:41 -04:00
Bo Anderson
1e52f08f49
brew.sh: fix HOMEBREW_CORE_DEFAULT_GIT_REMOTE not being exported 2022-06-17 19:47:55 +01:00
Rylan Polster
b896f6cb0d
Allow more developer commands with HOMEBREW_INSTALL_FROM_API 2022-06-16 21:31:15 -04:00
Rylan Polster
d23dba67ca
Merge pull request #12936 from Bo98/api-offline
Improve consistency between Git and API formula handling
2022-06-16 16:11:38 -04:00
Bo Anderson
1d36c42fb7
Support offline usage under HOMEBREW_INSTALL_FROM_API 2022-06-14 16:06:05 -04:00
Mike McQuaid
77203e0760
Document HOMEBREW_CURL_PATH and HOMEBREW_GIT_PATH
- document both these variables in `man brew`
- allow them to be used on Linux without `HOMEBREW_DEVELOPER`
2022-06-14 10:33:30 +01:00
Bo Anderson
d857c8416d
os/mac: allow fake El Capitan setup for Portable Ruby builds 2022-05-31 17:56:25 +01:00
Mike McQuaid
1bb44979ee
Disable and delete code for 3.5.0
The next planned release will be 3.5.0 so let's fix things up for there.
2022-05-30 14:59:14 +01:00
Mike McQuaid
00c5960a6a
Merge pull request #13299 from MikeMcQuaid/update_improvements
Improve updating behaviour
2022-05-24 13:05:24 +01:00
Gordon Bleux
9cbaf97069 decouple authentication information from HOMEBREW_ARTIFACT_DOMAIN
add support for credentials usage in combination with other mirroring
features. previously `HOMEBREW_DOCKER_REGISTRY_TOKEN` and
`HOMEBREW_DOCKER_REGISTRY_BASIC_AUTH_TOKEN` where only used in combination
with `HOMEBREW_ARTIFACT_DOMAIN` which affects *all* curl download strategies.
`HOMEBREW_BOTTLE_DOMAIN` is only used for bottle artifacts, whose mirror might
also require credentials.
this change removes the requirement of using `HOMEBREW_ARTIFACT_DOMAIN`.

related to #13226
2022-05-23 10:38:52 +02:00
Mike McQuaid
fb4c9353bb
Improve updating behaviour
- Rename use of "preinstall" to "auto update". The original "preinstall"
  naming came from the fact that we used to only auto-update before
  `brew install` but now that it's many commands: this is more confusing
  than useful.
- Add `HOMEBREW_NO_UPDATE_REPORT_ONLY_INSTALLED` and remove
  `HOMEBREW_UPDATE_REPORT_ONLY_INSTALLED`; the latter is now the default
  and the prior provides an opt-out for better output, performance and
  avoiding reading potentially untrusted formulae.
- Add `HOMEBREW_UPDATE_FORMULA_VERSION_CHECKS` and don't check formula
  versions by default for better performance by default.

Co-authored-by: Eric Knibbe <3324775+EricFromCanada@users.noreply.github.com>
Co-authored-by: Sam Ford <1584702+samford@users.noreply.github.com>
2022-05-19 11:04:20 -04:00
Michka Popoff
bc83c39337
debian7: force usage of brewed ca-certificates 2022-02-22 13:26:59 +01:00