bin/brew: don't filter GitHub Actions variables.

This commit is contained in:
Mike McQuaid 2020-08-07 09:14:07 +01:00
parent 03d07beb8c
commit a1dc809f5b
No known key found for this signature in database
GPG Key ID: 48A898132FD8EE70
5 changed files with 5 additions and 12 deletions

View File

@ -10,7 +10,6 @@ on:
- Library/Homebrew/os/mac/xcode.rb
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_GITHUB_ACTIONS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
jobs:
tests:

View File

@ -5,7 +5,6 @@ on:
pull_request: []
env:
HOMEBREW_DEVELOPER: 1
HOMEBREW_GITHUB_ACTIONS: 1
HOMEBREW_NO_AUTO_UPDATE: 1
jobs:
tests:
@ -73,11 +72,6 @@ jobs:
sudo chmod -R g-w,o-w /home/linuxbrew/.linuxbrew/Homebrew
fi
# set variables for coverage reporting
export HOMEBREW_CI_BUILD_NUMBER="$GITHUB_REF"
export HOMEBREW_CI_BRANCH="$HEAD_GITHUB_REF"
export HOMEBREW_GITHUB_REPOSITORY="$GITHUB_REPOSITORY"
# don't bother running all tests on both platforms (for speed)
if [ "$RUNNER_OS" = "Linux" ]; then
brew tests --no-compat --online

View File

@ -907,7 +907,7 @@ module Homebrew
def check_cask_staging_location
# Skip this check when running CI since the staging path is not writable for security reasons
return if ENV["HOMEBREW_GITHUB_ACTIONS"]
return if ENV["GITHUB_ACTIONS"]
path = Cask::Caskroom.path

View File

@ -73,7 +73,7 @@ module Homebrew
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
# repository. This only needs to support whatever CI providers
# Homebrew/brew is currently using.
return if ENV["HOMEBREW_GITHUB_ACTIONS"]
return if ENV["GITHUB_ACTIONS"]
message = <<~EOS
Your Xcode (#{MacOS::Xcode.version}) is outdated.
@ -100,7 +100,7 @@ module Homebrew
# `brew test-bot` runs `brew doctor` in the CI for the Homebrew/brew
# repository. This only needs to support whatever CI providers
# Homebrew/brew is currently using.
return if ENV["HOMEBREW_GITHUB_ACTIONS"]
return if ENV["GITHUB_ACTIONS"]
<<~EOS
A newer Command Line Tools release is available.

View File

@ -86,8 +86,7 @@ then
export CI="1"
fi
# test-bot does environment filtering itself
if [[ -z "$HOMEBREW_NO_ENV_FILTERING" && "$1" != "test-bot" ]]
if [[ -z "$HOMEBREW_NO_ENV_FILTERING" ]]
then
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
@ -95,6 +94,7 @@ then
# Filter all but the specific variables.
for VAR in HOME SHELL PATH TERM TERMINFO COLUMNS DISPLAY LOGNAME USER CI SSH_AUTH_SOCK SUDO_ASKPASS \
http_proxy https_proxy ftp_proxy no_proxy all_proxy HTTPS_PROXY FTP_PROXY ALL_PROXY \
GITHUB_ACTIONS GITHUB_REPOSITORY GITHUB_RUN_ID GITHUB_SHA GITHUB_HEAD_REF GITHUB_BASE_REF GITHUB_REF \
"${!HOMEBREW_@}"
do
# Skip if variable value is empty.