From 6a726d4c5040b331a2ea39f56dc4ff7580e8ef90 Mon Sep 17 00:00:00 2001 From: Dani Mehrjerdi Date: Mon, 16 Dec 2024 19:45:10 +0100 Subject: [PATCH] Fix precommit (#293) --- .pre-commit-config.yaml | 2 +- Dockerfile | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7f59ecc1..51f086a1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: - id: cargo-fmt-vault-simulator name: Cargo format for vault simulator language: "rust" - entry: cargo fmt --manifest-path ./vault-simulator/Cargo.toml --all -- --config-path rustfmt.toml + entry: cargo +nightly-2024-12-03 fmt --manifest-path ./vault-simulator/Cargo.toml --all -- --config-path rustfmt.toml pass_filenames: false files: vault-simulator - id: cargo-clippy-vault-simulator diff --git a/Dockerfile b/Dockerfile index 93ab7dcd..839f6d82 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,18 +45,16 @@ RUN forge install nomad-xyz/ExcessivelySafeCall@be417ab0c26233578b8d8f3a37b87bd1 # Build auction-server WORKDIR /src + COPY . . -WORKDIR /src/auction-server -RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release +RUN --mount=type=cache,target=/root/.cargo/registry cargo build -p auction-server --release # Build vault-simulator -WORKDIR /src -COPY vault-simulator vault-simulator WORKDIR /src/vault-simulator RUN --mount=type=cache,target=/root/.cargo/registry cargo build --release FROM rust:${RUST_VERSION} # Copy artifacts from other images -COPY --from=build /src/auction-server/target/release/auction-server /usr/local/bin/ +COPY --from=build /src/target/release/auction-server /usr/local/bin/ COPY --from=build /src/vault-simulator/target/release/vault-simulator /usr/local/bin/