diff --git a/check/src/docker.rs b/check/src/docker.rs index 37364a6..a40379d 100644 --- a/check/src/docker.rs +++ b/check/src/docker.rs @@ -46,6 +46,10 @@ fn create_image(version: &str) -> Result<()> { return Ok(()); } let cargo_stylus_version = env!("CARGO_PKG_VERSION"); + let cargo_stylus_version = cargo_stylus_version + .chars() + .filter(|c| c.is_alphanumeric() || *c == '-' || *c == '.') + .collect(); println!( "Building Docker image for cargo-stylus version {} and Rust toolchain {}", cargo_stylus_version, version, @@ -68,16 +72,14 @@ fn create_image(version: &str) -> Result<()> { RUN rustup target add wasm32-unknown-unknown RUN rustup target add wasm32-wasi RUN rustup target add x86_64-unknown-linux-gnu - RUN apt-get update && apt-get install -y git - RUN git clone https://github.com/offchainlabs/cargo-stylus.git - WORKDIR /cargo-stylus - RUN git checkout docker-checks - RUN cargo install --path check --force - RUN cargo install --path main --force + RUN cargo install cargo-stylus-check --version {} --force + RUN cargo install cargo-stylus --version {} --force ", RUST_BASE_IMAGE_VERSION, version, version, + cargo_stylus_version, + cargo_stylus_version, )?; child.wait().map_err(|e| eyre!("wait failed: {e}"))?; Ok(()) diff --git a/check/src/main.rs b/check/src/main.rs index 7c91be9..82fcbf8 100644 --- a/check/src/main.rs +++ b/check/src/main.rs @@ -288,8 +288,6 @@ async fn main_impl(args: Opts) -> Result<()> { } Apis::Check(config) => { if config.no_verify { - println!("WARNING: Running using --no-verify. This is not recommended for production use \ - as it will not guarantee reproducible builds."); run!(check::check(&config).await, "stylus checks failed"); } else { let mut commands: Vec = @@ -309,8 +307,6 @@ async fn main_impl(args: Opts) -> Result<()> { } Apis::Deploy(config) => { if config.check_config.no_verify { - println!("WARNING: Running using --no-verify. This is not recommended for production use \ - as it will not guarantee reproducible builds."); run!(deploy::deploy(config).await, "stylus deploy failed"); } else { let mut commands: Vec = @@ -330,8 +326,6 @@ async fn main_impl(args: Opts) -> Result<()> { } Apis::Verify(config) => { if config.no_verify { - println!("WARNING: Running using --no-verify. This is not recommended for production use \ - as it will not guarantee reproducible builds."); run!(verify::verify(config).await, "failed to verify"); } else { let mut commands: Vec =