Merge pull request #12206 from Bo98/vendor-gems-fix

utils/git: remove external dependency loading
This commit is contained in:
Bo Anderson 2021-10-07 17:41:22 +01:00 committed by GitHub
commit c6d27823ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 6 deletions

View File

@ -105,14 +105,18 @@ describe "brew bottle" do
"#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json"
}.to output(<<~EOS).to_stdout
}.to output(Regexp.new(<<~'EOS')).to_stdout
==> testball
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f"
sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac"
end
\[master [0-9a-f]{4,40}\] testball: add 1\.0 bottle\.
1 file changed, 6 insertions\(\+\)
EOS
.and not_to_output.to_stderr
.and be_a_success
expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS
class Testball < Formula
@ -168,14 +172,18 @@ describe "brew bottle" do
"#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json"
}.to output(<<~EOS).to_stdout
}.to output(Regexp.new(<<~'EOS')).to_stdout
==> testball
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
sha256 cellar: :any_skip_relocation, big_sur: "a0af7dcbb5c83f6f3f7ecd507c2d352c1a018f894d51ad241ce8492fa598010f"
sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac"
end
\[master [0-9a-f]{4,40}\] testball: update 1\.0 bottle\.
1 file changed, 3 insertions\(\+\), 3 deletions\(\-\)
EOS
.and not_to_output.to_stderr
.and be_a_success
expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS
class Testball < Formula
@ -230,7 +238,7 @@ describe "brew bottle" do
"#{TEST_TMPDIR}/testball-1.0.arm64_big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.big_sur.bottle.json",
"#{TEST_TMPDIR}/testball-1.0.catalina.bottle.json"
}.to output(<<~EOS).to_stdout
}.to output(Regexp.new(<<~'EOS')).to_stdout
==> testball
bottle do
sha256 cellar: :any_skip_relocation, arm64_big_sur: "8f9aecd233463da6a4ea55f5f88fc5841718c013f3e2a7941350d6130f1dc149"
@ -238,7 +246,11 @@ describe "brew bottle" do
sha256 cellar: :any_skip_relocation, catalina: "5334dd344986e46b2aa4f0471cac7b0914bd7de7cb890a34415771788d03f2ac"
sha256 cellar: :any, high_sierra: "6971b6eebf4c00eaaed72a1104a49be63861eabc95d679a0c84040398e320059"
end
\[master [0-9a-f]{4,40}\] testball: update 1\.0 bottle\.
1 file changed, 4 insertions\(\+\), 1 deletion\(\-\)
EOS
.and not_to_output.to_stderr
.and be_a_success
expect((core_tap.path/"Formula/testball.rb").read).to eq <<~EOS
class Testball < Formula

View File

@ -123,11 +123,11 @@ module Utils
end
def setup_gpg!
require "formula"
return unless Formula["gnupg"].optlinked?
gnupg_bin = HOMEBREW_PREFIX/"opt/gnupg/bin"
return unless gnupg_bin.directory?
ENV["PATH"] = PATH.new(ENV["PATH"])
.prepend(Formula["gnupg"].opt_bin)
.prepend(gnupg_bin)
end
# Special case of `git cherry-pick` that permits non-verbose output and