Merge pull request #14646 from MikeMcQuaid/auto_update_secs

Further adjust `HOMEBREW_AUTO_UPDATE_SECS`
This commit is contained in:
Mike McQuaid 2023-02-15 18:08:27 +00:00 committed by GitHub
commit 381238b545
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 9 additions and 4 deletions

View File

@ -41,7 +41,7 @@ Metrics/PerceivedComplexity:
Metrics/MethodLength: Metrics/MethodLength:
Max: 232 Max: 232
Metrics/ModuleLength: Metrics/ModuleLength:
Max: 480 Max: 481
Exclude: Exclude:
# TODO: extract more of the bottling logic # TODO: extract more of the bottling logic
- "dev-cmd/bottle.rb" - "dev-cmd/bottle.rb"

View File

@ -270,6 +270,10 @@ auto-update() {
then then
# 24 hours # 24 hours
HOMEBREW_AUTO_UPDATE_SECS="86400" HOMEBREW_AUTO_UPDATE_SECS="86400"
elif [[ -n "${HOMEBREW_DEV_CMD_RUN}" ]]
then
# 1 hour
HOMEBREW_AUTO_UPDATE_SECS="3600"
else else
# 5 minutes # 5 minutes
HOMEBREW_AUTO_UPDATE_SECS="300" HOMEBREW_AUTO_UPDATE_SECS="300"

View File

@ -47,7 +47,8 @@ module Homebrew
description: "Run `brew update` once every `HOMEBREW_AUTO_UPDATE_SECS` seconds before some commands, " \ description: "Run `brew update` once every `HOMEBREW_AUTO_UPDATE_SECS` seconds before some commands, " \
"e.g. `brew install`, `brew upgrade` and `brew tap`. Alternatively, " \ "e.g. `brew install`, `brew upgrade` and `brew tap`. Alternatively, " \
"disable auto-update entirely with `HOMEBREW_NO_AUTO_UPDATE`.", "disable auto-update entirely with `HOMEBREW_NO_AUTO_UPDATE`.",
default_text: "86400 (24 hours) or 300 (5 minutes) if `HOMEBREW_NO_INSTALL_FROM_API` is set.", default_text: "86400 (24 hours), 3600 (1 hour) if a developer command has been run " \
"or 300 (5 minutes) if `HOMEBREW_NO_INSTALL_FROM_API` is set.",
}, },
HOMEBREW_AUTOREMOVE: { HOMEBREW_AUTOREMOVE: {
description: "If set, calls to `brew cleanup` and `brew uninstall` will automatically " \ description: "If set, calls to `brew cleanup` and `brew uninstall` will automatically " \

View File

@ -2003,7 +2003,7 @@ example, run `export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
- `HOMEBREW_AUTO_UPDATE_SECS` - `HOMEBREW_AUTO_UPDATE_SECS`
<br>Run `brew update` once every `HOMEBREW_AUTO_UPDATE_SECS` seconds before some commands, e.g. `brew install`, `brew upgrade` and `brew tap`. Alternatively, disable auto-update entirely with `HOMEBREW_NO_AUTO_UPDATE`. <br>Run `brew update` once every `HOMEBREW_AUTO_UPDATE_SECS` seconds before some commands, e.g. `brew install`, `brew upgrade` and `brew tap`. Alternatively, disable auto-update entirely with `HOMEBREW_NO_AUTO_UPDATE`.
*Default:* 86400 (24 hours) or 300 (5 minutes) if `HOMEBREW_NO_INSTALL_FROM_API` is set. *Default:* 86400 (24 hours), 3600 (1 hour) if a developer command has been run or 300 (5 minutes) if `HOMEBREW_NO_INSTALL_FROM_API` is set.
- `HOMEBREW_AUTOREMOVE` - `HOMEBREW_AUTOREMOVE`
<br>If set, calls to `brew cleanup` and `brew uninstall` will automatically remove unused formula dependents and if `HOMEBREW_NO_INSTALL_CLEANUP` is not set, `brew cleanup` will start running `brew autoremove` periodically. <br>If set, calls to `brew cleanup` and `brew uninstall` will automatically remove unused formula dependents and if `HOMEBREW_NO_INSTALL_CLEANUP` is not set, `brew cleanup` will start running `brew autoremove` periodically.

View File

@ -2864,7 +2864,7 @@ Check Homebrew\'s API for new formulae or cask data every \fBHOMEBREW_API_AUTO_U
Run \fBbrew update\fR once every \fBHOMEBREW_AUTO_UPDATE_SECS\fR seconds before some commands, e\.g\. \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew tap\fR\. Alternatively, disable auto\-update entirely with \fBHOMEBREW_NO_AUTO_UPDATE\fR\. Run \fBbrew update\fR once every \fBHOMEBREW_AUTO_UPDATE_SECS\fR seconds before some commands, e\.g\. \fBbrew install\fR, \fBbrew upgrade\fR and \fBbrew tap\fR\. Alternatively, disable auto\-update entirely with \fBHOMEBREW_NO_AUTO_UPDATE\fR\.
. .
.IP .IP
\fIDefault:\fR 86400 (24 hours) or 300 (5 minutes) if \fBHOMEBREW_NO_INSTALL_FROM_API\fR is set\. \fIDefault:\fR 86400 (24 hours), 3600 (1 hour) if a developer command has been run or 300 (5 minutes) if \fBHOMEBREW_NO_INSTALL_FROM_API\fR is set\.
. .
.TP .TP
\fBHOMEBREW_AUTOREMOVE\fR \fBHOMEBREW_AUTOREMOVE\fR