From cfdcc29a5f91420c99aed26ba9947bef0eff4ed4 Mon Sep 17 00:00:00 2001 From: Philip White Date: Sat, 23 Jul 2022 09:33:28 -0700 Subject: [PATCH] Allow setting web3signer version through environment (#3369) The goal is to make it possible to build Lighthouse without network access, so builds can be reproducible. This parallels the existing functionality in `common/deposit_contract/build.rs`, which allows specifying a filename through the environment to avoid downloading it. In this case, by specifying the version and making it available on the filesystem, the existing logic will avoid a network download. --- .gitignore | 3 +++ testing/web3signer_tests/build.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/.gitignore b/.gitignore index 9830ef39bea..ae9f83c46dd 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,6 @@ perf.data* /bin genesis.ssz /clippy.toml + +# IntelliJ +/*.iml diff --git a/testing/web3signer_tests/build.rs b/testing/web3signer_tests/build.rs index ac34b5197fc..f62dff0b6fe 100644 --- a/testing/web3signer_tests/build.rs +++ b/testing/web3signer_tests/build.rs @@ -29,6 +29,8 @@ pub async fn download_binary(dest_dir: PathBuf) { let version = if let Some(version) = FIXED_VERSION_STRING { version.to_string() + } else if let Ok(env_version) = env::var("LIGHTHOUSE_WEB3SIGNER_VERSION") { + env_version } else { // Get the latest release of the web3 signer repo. let latest_response: Value = client