mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
dev-cmd/tap-new: use Utils::Git.setup_gpg!
This commit is contained in:
parent
d407a86878
commit
f648b071ad
@ -149,6 +149,9 @@ module Homebrew
|
|||||||
|
|
||||||
unless args.no_git?
|
unless args.no_git?
|
||||||
cd tap.path do
|
cd tap.path do
|
||||||
|
Utils::Git.set_name_email!
|
||||||
|
Utils::Git.setup_gpg!
|
||||||
|
|
||||||
# Would be nice to use --initial-branch here but it's not available in
|
# Would be nice to use --initial-branch here but it's not available in
|
||||||
# older versions of Git that we support.
|
# older versions of Git that we support.
|
||||||
safe_system "git", "-c", "init.defaultBranch=#{branch}", "init"
|
safe_system "git", "-c", "init.defaultBranch=#{branch}", "init"
|
||||||
|
@ -7,6 +7,9 @@ describe "brew tap-new" do
|
|||||||
it_behaves_like "parseable arguments"
|
it_behaves_like "parseable arguments"
|
||||||
|
|
||||||
it "initializes a new tap with a README file and GitHub Actions CI", :integration_test do
|
it "initializes a new tap with a README file and GitHub Actions CI", :integration_test do
|
||||||
|
# To ensure that Utils::Git.setup_gpg! doesn't raise an error
|
||||||
|
setup_test_formula "gnupg"
|
||||||
|
|
||||||
expect { brew "tap-new", "homebrew/foo", "--verbose" }
|
expect { brew "tap-new", "homebrew/foo", "--verbose" }
|
||||||
.to be_a_success
|
.to be_a_success
|
||||||
.and output(%r{homebrew/foo}).to_stdout
|
.and output(%r{homebrew/foo}).to_stdout
|
||||||
|
@ -162,7 +162,7 @@ RSpec.shared_context "integration test" do # rubocop:disable RSpec/ContextWordin
|
|||||||
|
|
||||||
# something here
|
# something here
|
||||||
RUBY
|
RUBY
|
||||||
when "foo", "patchelf"
|
when "foo", "gnupg", "patchelf"
|
||||||
content = <<~RUBY
|
content = <<~RUBY
|
||||||
url "https://brew.sh/#{name}-1.0"
|
url "https://brew.sh/#{name}-1.0"
|
||||||
RUBY
|
RUBY
|
||||||
|
Loading…
x
Reference in New Issue
Block a user