Skip to content

Commit

Permalink
fixed weird build script bug
Browse files Browse the repository at this point in the history
  • Loading branch information
perpetualcacophony committed Jul 25, 2024
1 parent cd5a845 commit 471e4ed
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "slimebot"
edition = "2021"
readme = "README.md"
license = "AGPL-3.0"
build = "build.rs"

[profile.release]
strip = true
Expand Down Expand Up @@ -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"]
Expand Down
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 471e4ed

Please sign in to comment.