Add HOMEBREW_ARTIFACT_DOMAIN option.
If set, this environment variable instructs Homebrew to use the given URL as a download mirror (e.g. an Artifactory instance) for bottles and binaries. Closes #387. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
b586a04204
commit
48a1e1b47f
@ -330,6 +330,11 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
|
|||||||
|
|
||||||
# Private method, can be overridden if needed.
|
# Private method, can be overridden if needed.
|
||||||
def _fetch
|
def _fetch
|
||||||
|
if ENV["HOMEBREW_ARTIFACT_DOMAIN"]
|
||||||
|
@url.sub!(%r{^((ht|f)tps?://)?}, ENV["HOMEBREW_ARTIFACT_DOMAIN"].chomp("/") + "/")
|
||||||
|
ohai "Downloading from #{@url}"
|
||||||
|
end
|
||||||
|
|
||||||
urls = actual_urls
|
urls = actual_urls
|
||||||
unless urls.empty?
|
unless urls.empty?
|
||||||
ohai "Downloading from #{urls.last}"
|
ohai "Downloading from #{urls.last}"
|
||||||
|
|||||||
@ -105,6 +105,9 @@ can take several different forms:
|
|||||||
* `HOMEBREW_BOTTLE_DOMAIN`:
|
* `HOMEBREW_BOTTLE_DOMAIN`:
|
||||||
If set, instructs Homebrew to use the given URL as a download mirror for bottles.
|
If set, instructs Homebrew to use the given URL as a download mirror for bottles.
|
||||||
|
|
||||||
|
* `HOMEBREW_ARTIFACT_DOMAIN`:
|
||||||
|
If set, instructs Homebrew to use the given URL as a download mirror for bottles and binaries.
|
||||||
|
|
||||||
* `HOMEBREW_BROWSER`:
|
* `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.
|
||||||
|
|||||||
@ -518,6 +518,7 @@ a Homebrew-built Git if installed, or the system-provided binary.</p>
|
|||||||
|
|
||||||
<p>Set this to force Homebrew to use a particular git binary.</p></dd>
|
<p>Set this to force Homebrew to use a particular git binary.</p></dd>
|
||||||
<dt><code>HOMEBREW_BOTTLE_DOMAIN</code></dt><dd><p>If set, instructs Homebrew to use the given URL as a download mirror for bottles.</p></dd>
|
<dt><code>HOMEBREW_BOTTLE_DOMAIN</code></dt><dd><p>If set, instructs Homebrew to use the given URL as a download mirror for bottles.</p></dd>
|
||||||
|
<dt><code>HOMEBREW_ARTIFACT_DOMAIN</code></dt><dd><p>If set, instructs Homebrew to use the given URL as a download mirror for bottles and binaries.</p></dd>
|
||||||
<dt><code>HOMEBREW_BROWSER</code></dt><dd><p>If set, uses this setting as the browser when opening project homepages,
|
<dt><code>HOMEBREW_BROWSER</code></dt><dd><p>If set, uses this setting as the browser when opening project homepages,
|
||||||
instead of the OS default browser.</p></dd>
|
instead of the OS default browser.</p></dd>
|
||||||
<dt><code>HOMEBREW_BUILD_FROM_SOURCE</code></dt><dd><p>If set, instructs Homebrew to compile from source even when a formula
|
<dt><code>HOMEBREW_BUILD_FROM_SOURCE</code></dt><dd><p>If set, instructs Homebrew to compile from source even when a formula
|
||||||
|
|||||||
@ -715,6 +715,10 @@ Set this to force Homebrew to use a particular git binary\.
|
|||||||
If set, instructs Homebrew to use the given URL as a download mirror for bottles\.
|
If set, instructs Homebrew to use the given URL as a download mirror for bottles\.
|
||||||
.
|
.
|
||||||
.TP
|
.TP
|
||||||
|
\fBHOMEBREW_ARTIFACT_DOMAIN\fR
|
||||||
|
If set, instructs Homebrew to use the given URL as a download mirror for bottles and binaries\.
|
||||||
|
.
|
||||||
|
.TP
|
||||||
\fBHOMEBREW_BROWSER\fR
|
\fBHOMEBREW_BROWSER\fR
|
||||||
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