From 93b8fa7838b7bc1a4e8c315151ebfed1ae60461b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?fn=20=E2=8C=83=20=E2=8C=A5?= <70830482+FnControlOption@users.noreply.github.com> Date: Fri, 19 Nov 2021 11:48:23 -0800 Subject: [PATCH] pr-upload: deprecate `--github-org=` --- Library/Homebrew/dev-cmd/pr-upload.rb | 8 ++++---- Library/Homebrew/github_packages.rb | 14 -------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/Library/Homebrew/dev-cmd/pr-upload.rb b/Library/Homebrew/dev-cmd/pr-upload.rb index d36122b601..61020744a4 100644 --- a/Library/Homebrew/dev-cmd/pr-upload.rb +++ b/Library/Homebrew/dev-cmd/pr-upload.rb @@ -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 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?, diff --git a/Library/Homebrew/github_packages.rb b/Library/Homebrew/github_packages.rb index 412962e53f..4f91d8de9c 100644 --- a/Library/Homebrew/github_packages.rb +++ b/Library/Homebrew/github_packages.rb @@ -33,20 +33,6 @@ class GitHubPackages "Macintosh" => "darwin", }.freeze - sig { returns(String) } - def inspect - "#" - 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],