Skip to content

Commit

Permalink
Preserve lock file.
Browse files Browse the repository at this point in the history
Loses the cache though.
  • Loading branch information
Emm committed Oct 21, 2023
1 parent 19eb221 commit 0b7fc33
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,10 @@ RUN curl "https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/
WORKDIR /usr/src/shortcut_release_helper
COPY --chmod=700 bin/generate_openapi_client.sh bin/cleanup.sh bin/
COPY --chmod=700 docker/openapi-generator-cli /usr/local/bin/

## Done to improve build times, ensures caching of dependencies independent of compilation
COPY Cargo.toml .
RUN mkdir src \
&& echo "// dummy file" > src/lib.rs \
&& cargo build --release || true

COPY shortcut_release_helper shortcut_release_helper
RUN cargo build --release
COPY Cargo.toml Cargo.lock ./
COPY shortcut_release_helper ./shortcut_release_helper/
RUN ./bin/generate_openapi_client.sh
RUN cargo build --release --bin shortcut_release_helper


FROM debian:bullseye-slim
Expand Down

0 comments on commit 0b7fc33

Please sign in to comment.