From c11692ba780d7a5663aa693107d98d99a83d1050 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Mon, 22 Feb 2021 17:56:26 -0800 Subject: [PATCH] pr-pull: Upload bottles to Archive.org Add option --archive-item --- Library/Homebrew/dev-cmd/pr-pull.rb | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/dev-cmd/pr-pull.rb b/Library/Homebrew/dev-cmd/pr-pull.rb index 86a20aa26c..f4aaf5f141 100644 --- a/Library/Homebrew/dev-cmd/pr-pull.rb +++ b/Library/Homebrew/dev-cmd/pr-pull.rb @@ -49,6 +49,8 @@ module Homebrew description: "Message to include when autosquashing revision bumps, deletions, and rebuilds." flag "--artifact=", description: "Download artifacts with the specified name (default: `bottles`)." + flag "--archive-item=", + description: "Upload to the specified Archive item (default: `homebrew`)." flag "--bintray-org=", description: "Upload to the specified Bintray organisation (default: `homebrew`)." flag "--tap=", @@ -65,6 +67,7 @@ module Homebrew description: "Comma-separated list of workflows which can be ignored if they have not been run." conflicts "--clean", "--autosquash" + conflicts "--archive-item", "--bintray-org" named_args :pull_request, min: 1 end @@ -357,6 +360,7 @@ module Homebrew workflows = args.workflows.presence || ["tests.yml"] artifact = args.artifact || "bottles" + archive_item = args.archive_item bintray_org = args.bintray_org || "homebrew" mirror_repo = args.bintray_mirror || "mirror" tap = Tap.fetch(args.tap || CoreTap.instance.name) @@ -424,7 +428,11 @@ module Homebrew upload_args << "--keep-old" if args.keep_old? upload_args << "--warn-on-upload-failure" if args.warn_on_upload_failure? upload_args << "--root-url=#{args.root_url}" if args.root_url - upload_args << "--bintray-org=#{bintray_org}" + upload_args << if archive_item.present? + "--archive-item=#{archive_item}" + else + "--bintray-org=#{bintray_org}" + end safe_system HOMEBREW_BREW_FILE, *upload_args end end