未验证 提交 ef4e329c 编辑于 作者: Mike McQuaid's avatar Mike McQuaid 提交者: GitHub
浏览文件

Merge pull request #12457 from FnControlOption/pr-upload

pr-upload: deprecate `--github-org=`
......@@ -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?,
......
......@@ -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],
......
支持 Markdown
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册