cmd/update-report: tweak messages for CI
This commit is contained in:
parent
cf180bbc96
commit
623eeb4e47
@ -77,4 +77,5 @@ RUN mkdir -p \
|
|||||||
&& brew cleanup \
|
&& brew cleanup \
|
||||||
&& { git -C .linuxbrew/Homebrew config --unset gc.auto; true; } \
|
&& { git -C .linuxbrew/Homebrew config --unset gc.auto; true; } \
|
||||||
&& { git -C .linuxbrew/Homebrew config --unset homebrew.devcmdrun; true; } \
|
&& { git -C .linuxbrew/Homebrew config --unset homebrew.devcmdrun; true; } \
|
||||||
&& rm -rf .cache
|
&& rm -rf .cache \
|
||||||
|
&& touch .linuxbrew/.homebrewdocker
|
||||||
|
@ -376,16 +376,17 @@ module Homebrew
|
|||||||
api_auto_update_secs = Homebrew::EnvConfig.api_auto_update_secs.to_i
|
api_auto_update_secs = Homebrew::EnvConfig.api_auto_update_secs.to_i
|
||||||
api_auto_update_secs_default = Homebrew::EnvConfig::ENVS.fetch(:HOMEBREW_API_AUTO_UPDATE_SECS).fetch(:default)
|
api_auto_update_secs_default = Homebrew::EnvConfig::ENVS.fetch(:HOMEBREW_API_AUTO_UPDATE_SECS).fetch(:default)
|
||||||
auto_update_secs_set = api_auto_update_secs.positive? && api_auto_update_secs != api_auto_update_secs_default
|
auto_update_secs_set = api_auto_update_secs.positive? && api_auto_update_secs != api_auto_update_secs_default
|
||||||
if !Homebrew::EnvConfig.no_auto_update? && !Homebrew::EnvConfig.no_install_from_api? && !auto_update_secs_set
|
no_auto_update_set = Homebrew::EnvConfig.no_auto_update? &&
|
||||||
return
|
!ENV["HOMEBREW_GITHUB_HOSTED_RUNNER"] &&
|
||||||
end
|
!ENV["GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED"]
|
||||||
|
no_install_from_api_set = Homebrew::EnvConfig.no_install_from_api? &&
|
||||||
|
!Homebrew::EnvConfig.automatically_set_no_install_from_api?
|
||||||
|
return if !no_auto_update_set && !no_install_from_api_set && !auto_update_secs_set
|
||||||
|
|
||||||
ohai "You have set:"
|
ohai "You have set:"
|
||||||
puts " HOMEBREW_NO_AUTO_UPDATE" if Homebrew::EnvConfig.no_auto_update?
|
puts " HOMEBREW_NO_AUTO_UPDATE" if no_auto_update_set
|
||||||
puts " HOMEBREW_API_AUTO_UPDATE_SECS" if auto_update_secs_set
|
puts " HOMEBREW_API_AUTO_UPDATE_SECS" if auto_update_secs_set
|
||||||
if Homebrew::EnvConfig.no_install_from_api? && !Homebrew::EnvConfig.automatically_set_no_install_from_api?
|
puts " HOMEBREW_NO_INSTALL_FROM_API" if no_install_from_api_set
|
||||||
puts " HOMEBREW_NO_INSTALL_FROM_API"
|
|
||||||
end
|
|
||||||
puts "but we have dramatically sped up and fixed many bugs in the way we do Homebrew updates since."
|
puts "but we have dramatically sped up and fixed many bugs in the way we do Homebrew updates since."
|
||||||
puts "Please consider unsetting these and tweaking the values based on the new behaviour."
|
puts "Please consider unsetting these and tweaking the values based on the new behaviour."
|
||||||
puts "\n\n"
|
puts "\n\n"
|
||||||
@ -397,6 +398,8 @@ module Homebrew
|
|||||||
def untap_message
|
def untap_message
|
||||||
return if Homebrew::EnvConfig.no_install_from_api?
|
return if Homebrew::EnvConfig.no_install_from_api?
|
||||||
return if Homebrew::EnvConfig.developer? || ENV["HOMEBREW_DEV_CMD_RUN"]
|
return if Homebrew::EnvConfig.developer? || ENV["HOMEBREW_DEV_CMD_RUN"]
|
||||||
|
return if ENV["HOMEBREW_GITHUB_HOSTED_RUNNER"] || ENV["GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED"]
|
||||||
|
return if (HOMEBREW_PREFIX/".homebrewdocker").exist?
|
||||||
|
|
||||||
core_tap = CoreTap.instance
|
core_tap = CoreTap.instance
|
||||||
cask_tap = Tap.default_cask_tap
|
cask_tap = Tap.default_cask_tap
|
||||||
|
5
bin/brew
5
bin/brew
@ -139,6 +139,11 @@ then
|
|||||||
export CI="1"
|
export CI="1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ -n "${GITHUB_ACTIONS:-}" && -n "${ImageOS:-}" && -n "${ImageVersion:-}" ]]
|
||||||
|
then
|
||||||
|
export HOMEBREW_GITHUB_HOSTED_RUNNER=1
|
||||||
|
fi
|
||||||
|
|
||||||
# filter the user environment
|
# filter the user environment
|
||||||
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
|
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user