pr-pull: pass verbose and debug to subcommands

This commit is contained in:
Jonathan Chang 2020-06-22 00:21:22 +10:00
parent c496e6bfcb
commit 2b990aa53c
2 changed files with 8 additions and 0 deletions

View File

@ -147,6 +147,8 @@ module Homebrew
else
odebug "Mirroring #{mirror_url}"
mirror_args = ["mirror", f.full_name]
mirror_args << "--debug" if Homebrew.args.debug?
mirror_args << "--verbose" if Homebrew.args.verbose?
mirror_args << "--bintray-org=#{org}" if org
mirror_args << "--bintray-repo=#{repo}" if repo
mirror_args << "--no-publish" unless publish
@ -247,6 +249,8 @@ module Homebrew
next if args.no_upload?
upload_args = ["pr-upload"]
upload_args << "--debug" if Homebrew.args.debug?
upload_args << "--verbose" if Homebrew.args.verbose?
upload_args << "--no-publish" if args.no_publish?
upload_args << "--dry-run" if args.dry_run?
upload_args << "--root_url=#{args.root_url}" if args.root_url

View File

@ -21,6 +21,8 @@ module Homebrew
description: "Upload to the specified Bintray organisation (default: homebrew)."
flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
switch :verbose
switch :debug
end
end
@ -31,6 +33,8 @@ module Homebrew
bintray = Bintray.new(org: bintray_org)
bottle_args = ["bottle", "--merge", "--write"]
bottle_args << "--verbose" if args.verbose?
bottle_args << "--debug" if args.debug?
bottle_args << "--root-url=#{args.root_url}" if args.root_url
odie "No JSON files found in the current working directory" if Dir["*.json"].empty?
bottle_args += Dir["*.json"]