diff --git a/Library/Homebrew/dev-cmd/pr-upload.rb b/Library/Homebrew/dev-cmd/pr-upload.rb index 8d967cb95b..34c38af237 100644 --- a/Library/Homebrew/dev-cmd/pr-upload.rb +++ b/Library/Homebrew/dev-cmd/pr-upload.rb @@ -19,6 +19,8 @@ module Homebrew description: "Print what would be done rather than doing it." flag "--bintray-org=", description: "Upload to the specified Bintray organisation (default: homebrew)." + flag "--root-url=", + description: "Use the specified as the root of the bottle's URL instead of Homebrew's default." end end @@ -28,10 +30,15 @@ module Homebrew bintray_org = args.bintray_org || "homebrew" bintray = Bintray.new(org: bintray_org) + bottle_args = ["bottle", "--merge", "--write"] + bottle_args << "--root-url=#{args.root_url}" if args.root_url + odie "No JSON files found in the current working directory" if Dir["*.json"].empty? + bottle_args += Dir["*.json"] + if args.dry_run? - puts "brew bottle --merge --write #{Dir["*.json"].join " "}" + puts "brew #{bottle_args.join " "}" else - system HOMEBREW_BREW_FILE, "bottle", "--merge", "--write", *Dir["*.json"] + system HOMEBREW_BREW_FILE, "bottle", *bottle_args end if args.dry_run? diff --git a/docs/Manpage.md b/docs/Manpage.md index 9937c53319..a6eccb4505 100644 --- a/docs/Manpage.md +++ b/docs/Manpage.md @@ -908,6 +908,8 @@ Apply the bottle commit and publish bottles to Bintray. Print what would be done rather than doing it. * `--bintray-org`: Upload to the specified Bintray organisation (default: homebrew). +* `--root-url`: + Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default. ### `prof` *`command`* diff --git a/manpages/brew.1 b/manpages/brew.1 index 123b2a1ca0..39b4c97fdd 100644 --- a/manpages/brew.1 +++ b/manpages/brew.1 @@ -1178,6 +1178,10 @@ Print what would be done rather than doing it\. \fB\-\-bintray\-org\fR Upload to the specified Bintray organisation (default: homebrew)\. . +.TP +\fB\-\-root\-url\fR +Use the specified \fIURL\fR as the root of the bottle\'s URL instead of Homebrew\'s default\. +. .SS "\fBprof\fR \fIcommand\fR" Run Homebrew with the Ruby profiler, e\.g\. \fBbrew prof readall\fR\. .