Skip to content

Commit

Permalink
Allow setting web3signer version through environment (sigp#3369)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
philipmw committed Jul 23, 2022
1 parent 21dec6f commit 672ce62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ perf.data*
/bin
genesis.ssz
/clippy.toml

# IntelliJ
/*.iml
4 changes: 3 additions & 1 deletion testing/web3signer_tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ use zip::ZipArchive;

/// Use `None` to download the latest Github release.
/// Use `Some("21.8.1")` to download a specific version.
const FIXED_VERSION_STRING: Option<&str> = None;
const FIXED_VERSION_STRING: Option<String> =
env::var("LIGHTHOUSE_WEB3SIGNER_VERSION")
.ok();

#[tokio::main]
async fn main() {
Expand Down

0 comments on commit 672ce62

Please sign in to comment.