pr-upload: deprecate --github-org=

This commit is contained in:
fn ⌃ ⌥ 2021-11-19 11:48:23 -08:00
parent 27a76295a4
commit 93b8fa7838
2 changed files with 4 additions and 18 deletions

View File

@ -30,8 +30,7 @@ module Homebrew
description: "Skip running `brew bottle` before uploading."
flag "--committer=",
description: "Specify a committer name and email in `git`'s standard author format."
flag "--github-org=",
description: "Upload to the specified GitHub organisation's GitHub Packages (default: `homebrew`)."
flag "--github-org=", hidden: true
flag "--root-url=",
description: "Use the specified <URL> as the root of the bottle's URL instead of Homebrew's default."
flag "--root-url-using=",
@ -91,6 +90,8 @@ module Homebrew
def pr_upload
args = pr_upload_args.parse
# odeprecated "`brew pr-upload --github-org`", "`brew pr-upload` without `--github-org`" if args.github_org
json_files = Dir["*.bottle.json"]
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)
@ -158,8 +159,7 @@ module Homebrew
github_releases = GitHubReleases.new
github_releases.upload_bottles(bottles_hash)
elsif github_packages?(bottles_hash)
github_org = args.github_org || "homebrew"
github_packages = GitHubPackages.new(org: github_org)
github_packages = GitHubPackages.new
github_packages.upload_bottles(bottles_hash,
keep_old: args.keep_old?,
dry_run: args.dry_run?,

View File

@ -33,20 +33,6 @@ class GitHubPackages
"Macintosh" => "darwin",
}.freeze
sig { returns(String) }
def inspect
"#<GitHubPackages: org=#{@github_org}>"
end
sig { params(org: T.nilable(String)).void }
def initialize(org: "homebrew")
@github_org = org
raise UsageError, "Must set a GitHub organisation!" unless @github_org
ENV["HOMEBREW_FORCE_HOMEBREW_ON_LINUX"] = "1" if @github_org == "homebrew" && !OS.mac?
end
sig {
params(
bottles_hash: T::Hash[String, T.untyped],