From 471e4edff152bc8ed9eb95e974fc847c6b1ad507 Mon Sep 17 00:00:00 2001 From: kate <142743629+perpetualcacophony@users.noreply.github.com> Date: Thu, 25 Jul 2024 17:21:56 -0500 Subject: [PATCH] fixed weird build script bug --- Cargo.toml | 5 ++--- Dockerfile | 9 +++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c70798b..e2f96b8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,6 @@ name = "slimebot" edition = "2021" readme = "README.md" license = "AGPL-3.0" -build = "build.rs" [profile.release] strip = true @@ -61,8 +60,8 @@ pretty_assertions = "1.4.0" temp-mongo = "0.1.3" [build-dependencies] -built = { version = "0.7.3", features = ["git2"] } -git2 = { version = "0.18.3", features = ["vendored-libgit2"] } +built = { version = "0.7.4", features = ["git2"] } +git2 = { version = "0.19", features = ["vendored-libgit2"] } [features] default = ["wordle"] diff --git a/Dockerfile b/Dockerfile index be08c95..ecc6e95 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,12 +8,13 @@ COPY . . RUN cargo +nightly chef prepare --recipe-path recipe.json FROM chef AS builder -COPY --from=planner /app/recipe.json recipe.json +COPY --link --from=planner /app/recipe.json recipe.json RUN cargo +nightly chef cook --release --target x86_64-unknown-linux-musl --recipe-path recipe.json COPY . . -RUN cargo +nightly build --release --target x86_64-unknown-linux-musl --bin slimebot +RUN touch /app/build.rs +RUN cargo +nightly build --release --target x86_64-unknown-linux-musl -FROM alpine as runtime -COPY --from=builder /app/target/x86_64-unknown-linux-musl/release/slimebot /usr/local/bin/slimebot +FROM alpine AS runtime +COPY --link --from=builder /app/target/x86_64-unknown-linux-musl/release/slimebot /usr/local/bin/slimebot EXPOSE 443 ENTRYPOINT ["slimebot"] \ No newline at end of file