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.lock ./Cargo.lock
|
||||||
COPY ./Cargo.toml ./Cargo.toml
|
COPY ./Cargo.toml ./Cargo.toml
|
||||||
# HACK: remove build-dependencies so we have at least some caching
|
# 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
|
Cargo.toml2 && rm Cargo.toml && mv Cargo.toml2 Cargo.toml
|
||||||
# build to cache dependencies
|
# build to cache dependencies
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
@ -24,7 +24,6 @@ COPY ./.git ./.git
|
|||||||
# copy source code
|
# copy source code
|
||||||
COPY ./static ./static
|
COPY ./static ./static
|
||||||
COPY ./templates ./templates
|
COPY ./templates ./templates
|
||||||
COPY ./build.rs ./build.rs
|
|
||||||
COPY ./src ./src
|
COPY ./src ./src
|
||||||
# build source code
|
# build source code
|
||||||
RUN cargo build --release
|
RUN cargo build --release
|
||||||
|
Loading…
Reference in New Issue
Block a user