fix: cargo really is ignoring PROFILE venv

This commit is contained in:
meeg_leeto 2022-04-30 14:24:31 +01:00
parent 05c3072037
commit 464965ae33
1 changed files with 6 additions and 2 deletions

View File

@ -10,13 +10,17 @@ COPY ./Cargo.toml /lonk/Cargo.toml
ARG PROFILE
RUN cargo build
RUN [ "${PROFILE}" = "debug" ] \
&& cargo build \
|| cargo build --release
RUN rm src/*.rs
# Compile the source
COPY ./src ./src
RUN rm -f ./target/${PROFILE:-release}/deps/lonk*
RUN cargo build
RUN [ "${PROFILE}" = "debug" ] \
&& cargo build \
|| cargo build --release
# Execution container
FROM rust:slim