Fix docker build with moved build.rs
script
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
ced16e2e6b
commit
864cbe1c73
@ -10,7 +10,7 @@ RUN echo 'fn main() { println!("Hello, world!"); }' >> src/main.rs
|
||||
COPY ./Cargo.lock ./Cargo.lock
|
||||
COPY ./Cargo.toml ./Cargo.toml
|
||||
# HACK: remove build-dependencies so we have at least some caching
|
||||
RUN head -n $(($(grep -n "\[build-dependencies\]" Cargo.toml | cut -f1 -d:) - 1)) Cargo.toml | sed '/build.rs/d' > \
|
||||
RUN head -n $(($(grep -n "\[build-dependencies\]" Cargo.toml | cut -f1 -d:) - 1)) Cargo.toml | sed '/src\/build.rs/d' > \
|
||||
Cargo.toml2 && rm Cargo.toml && mv Cargo.toml2 Cargo.toml
|
||||
# build to cache dependencies
|
||||
RUN cargo build --release
|
||||
@ -24,7 +24,6 @@ COPY ./.git ./.git
|
||||
# copy source code
|
||||
COPY ./static ./static
|
||||
COPY ./templates ./templates
|
||||
COPY ./build.rs ./build.rs
|
||||
COPY ./src ./src
|
||||
# build source code
|
||||
RUN cargo build --release
|
||||
|
Loading…
Reference in New Issue
Block a user