Revert "pull: use homebrew remote if HOMEBREW_FORCE_HOMEBREW_ON_LINUX"

- This reverts commit 9fb1876101a1abac8e3bfcc9f4f6fadbf0921c7c and commit
f8863c8a3bbef32dc65c9b95a57b54d7fc26c27e.
- The `JENKINS_HOME` envvar appears to be unset on the Linux Jenkins
master that holds the BinTray credentials.
- It's bed time, we're too tired to be fixing forward!
This commit is contained in:
Issy Long 2020-02-24 22:56:33 +00:00
parent 9ce39808c8
commit 6d5f6ce96c
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4

View File

@ -287,12 +287,7 @@ module Homebrew
pr_number = url[%r{/pull\/([0-9]+)}, 1]
return false unless pr_number
# Use `homebrew` remote if HOMEBREW_FORCE_HOMEBREW_ON_LINUX env variable is set.
# The `homebrew` remote points to homebrew-core tap and is used by Linux maintainers.
# See https://docs.brew.sh/Homebrew-linuxbrew-core-Maintainer-Guide#preparation
# Skip that on Jenkins, because upload job runs on Linux.
remote = (ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] && ENV["JENKINS_HOME"].nil?) ? "homebrew" : "origin"
safe_system "git", "fetch", "--quiet", remote, "pull/#{pr_number}/head"
safe_system "git", "fetch", "--quiet", "origin", "pull/#{pr_number}/head"
Utils.popen_read("git", "rev-list", "--parents", "-n1", "FETCH_HEAD").count(" ") > 1
end