Merge pull request #12282 from Bo98/pr-upload-only
dev-cmd/pr-upload: add --upload-only switch
This commit is contained in:
commit
59d25d3ae8
@ -26,6 +26,8 @@ module Homebrew
|
|||||||
switch "--warn-on-upload-failure",
|
switch "--warn-on-upload-failure",
|
||||||
description: "Warn instead of raising an error if the bottle upload fails. "\
|
description: "Warn instead of raising an error if the bottle upload fails. "\
|
||||||
"Useful for repairing bottle uploads that previously failed."
|
"Useful for repairing bottle uploads that previously failed."
|
||||||
|
switch "--upload-only",
|
||||||
|
description: "Skip running `brew bottle` before uploading."
|
||||||
flag "--committer=",
|
flag "--committer=",
|
||||||
description: "Specify a committer name and email in `git`'s standard author format."
|
description: "Specify a committer name and email in `git`'s standard author format."
|
||||||
flag "--github-org=",
|
flag "--github-org=",
|
||||||
@ -36,6 +38,9 @@ module Homebrew
|
|||||||
description: "Use the specified download strategy class for downloading the bottle's URL instead of "\
|
description: "Use the specified download strategy class for downloading the bottle's URL instead of "\
|
||||||
"Homebrew's default."
|
"Homebrew's default."
|
||||||
|
|
||||||
|
conflicts "--upload-only", "--keep-old"
|
||||||
|
conflicts "--upload-only", "--no-commit"
|
||||||
|
|
||||||
named_args :none
|
named_args :none
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -90,6 +95,7 @@ module Homebrew
|
|||||||
odie "No bottle JSON files found in the current working directory" if json_files.blank?
|
odie "No bottle JSON files found in the current working directory" if json_files.blank?
|
||||||
bottles_hash = bottles_hash_from_json_files(json_files, args)
|
bottles_hash = bottles_hash_from_json_files(json_files, args)
|
||||||
|
|
||||||
|
unless args.upload_only?
|
||||||
bottle_args = ["bottle", "--merge", "--write"]
|
bottle_args = ["bottle", "--merge", "--write"]
|
||||||
bottle_args << "--verbose" if args.verbose?
|
bottle_args << "--verbose" if args.verbose?
|
||||||
bottle_args << "--debug" if args.debug?
|
bottle_args << "--debug" if args.debug?
|
||||||
@ -146,6 +152,7 @@ module Homebrew
|
|||||||
audit_args += bottles_hash.keys
|
audit_args += bottles_hash.keys
|
||||||
safe_system HOMEBREW_BREW_FILE, *audit_args
|
safe_system HOMEBREW_BREW_FILE, *audit_args
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
if github_releases?(bottles_hash)
|
if github_releases?(bottles_hash)
|
||||||
github_releases = GitHubReleases.new
|
github_releases = GitHubReleases.new
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user