support downloading bottles through 3rd-party mirror
Closes Homebrew/homebrew#41328. Closes Homebrew/homebrew#41332. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
4443a87524
commit
ab9a62370f
@ -1,4 +1,5 @@
|
|||||||
require 'hardware'
|
require 'hardware'
|
||||||
|
require "software_spec"
|
||||||
|
|
||||||
module Homebrew
|
module Homebrew
|
||||||
def config
|
def config
|
||||||
@ -137,6 +138,7 @@ module Homebrew
|
|||||||
f.puts "Last commit: #{last_commit}"
|
f.puts "Last commit: #{last_commit}"
|
||||||
f.puts "HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}"
|
f.puts "HOMEBREW_PREFIX: #{HOMEBREW_PREFIX}"
|
||||||
f.puts "HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}"
|
f.puts "HOMEBREW_CELLAR: #{HOMEBREW_CELLAR}"
|
||||||
|
f.puts "HOMEBREW_BOTTLE_DOMAIN: #{BottleSpecification::DEFAULT_DOMAIN}"
|
||||||
f.puts hardware
|
f.puts hardware
|
||||||
f.puts "OS X: #{MACOS_FULL_VERSION}-#{kernel}"
|
f.puts "OS X: #{MACOS_FULL_VERSION}-#{kernel}"
|
||||||
f.puts "Xcode: #{xcode ? xcode : "N/A"}"
|
f.puts "Xcode: #{xcode ? xcode : "N/A"}"
|
||||||
|
|||||||
@ -540,7 +540,10 @@ can take several different forms:
|
|||||||
|
|
||||||
Set this to force Homebrew to use a particular git binary.
|
Set this to force Homebrew to use a particular git binary.
|
||||||
|
|
||||||
* HOMEBREW_BROWSER:
|
* HOMEBREW\_BOTTLE\_DOMAIN:
|
||||||
|
If set, instructs Homebrew to use the given URL as a download mirror for bottles.
|
||||||
|
|
||||||
|
* HOMEBREW\_BROWSER:
|
||||||
If set, uses this setting as the browser when opening project homepages,
|
If set, uses this setting as the browser when opening project homepages,
|
||||||
instead of the OS default browser.
|
instead of the OS default browser.
|
||||||
|
|
||||||
|
|||||||
@ -259,7 +259,7 @@ end
|
|||||||
class BottleSpecification
|
class BottleSpecification
|
||||||
DEFAULT_PREFIX = "/usr/local".freeze
|
DEFAULT_PREFIX = "/usr/local".freeze
|
||||||
DEFAULT_CELLAR = "/usr/local/Cellar".freeze
|
DEFAULT_CELLAR = "/usr/local/Cellar".freeze
|
||||||
DEFAULT_DOMAIN = "https://homebrew.bintray.com".freeze
|
DEFAULT_DOMAIN = (ENV["HOMEBREW_BOTTLE_DOMAIN"] || "https://homebrew.bintray.com").freeze
|
||||||
|
|
||||||
attr_rw :prefix, :cellar, :revision
|
attr_rw :prefix, :cellar, :revision
|
||||||
attr_accessor :tap
|
attr_accessor :tap
|
||||||
|
|||||||
@ -507,6 +507,10 @@ When using Git, Homebrew will use \fBGIT\fR if set, a Homebrew\-built Git if ins
|
|||||||
Set this to force Homebrew to use a particular git binary\.
|
Set this to force Homebrew to use a particular git binary\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
HOMEBREW_BOTTLE_DOMAIN
|
||||||
|
If set, instructs Homebrew to use the given URL as a download mirror for bottles\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
HOMEBREW_BROWSER
|
HOMEBREW_BROWSER
|
||||||
If set, uses this setting as the browser when opening project homepages, instead of the OS default browser\.
|
If set, uses this setting as the browser when opening project homepages, instead of the OS default browser\.
|
||||||
.
|
.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user