0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2025-01-11 08:34:01 -05:00

Specify custom URL for binary downloads with 'RUSTY_V8_MIRROR' env var (#446)

This commit is contained in:
picoHz 2020-08-28 19:03:34 +09:00 committed by GitHub
parent 1ccabcc650
commit fa8f636397
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -39,6 +39,9 @@ Binaries builds are turned on by default: `cargo build` will initiate a download
from github to get the static lib. To disable this build using the
`V8_FROM_SOURCE` environmental variable.
If you prefer another location for downloading binaries,
use the`RUSTY_V8_MIRROR` environmental variable.
When making changes to rusty_v8 itself, it should be tested by build from
source. The CI always builds from source.

View file

@ -174,7 +174,9 @@ fn download_ninja_gn_binaries() {
}
fn static_lib_url() -> (String, String) {
let base = "https://github.com/denoland/rusty_v8/releases/download";
let default_base = "https://github.com/denoland/rusty_v8/releases/download";
let base =
env::var("RUSTY_V8_MIRROR").unwrap_or_else(|_| default_base.into());
let version = env::var("CARGO_PKG_VERSION").unwrap();
let target = env::var("TARGET").unwrap();
if cfg!(target_os = "windows") {