Skip to content

Commit

Permalink
reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
idelvall committed Nov 14, 2023
1 parent cf109e6 commit 1e5e15a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ CARGO:
mv /earthly_lib_rust_temp/* target 2>/dev/null || echo "no files found within ./target matching the provided output regexp" ;
END

INSTALL_CARGO_SWEEP:
COMMAND
RUN if [ ! -f $CARGO_HOME/bin/cargo-sweep ]; then \
echo "Installing cargo sweep" ; \
cargo install cargo-sweep --root $CARGO_HOME; \
fi;

# REMOVE_SOURCE_FINGERPRINTS removes the Cargo fingerprint folders of the source packages.
# This guarantees Cargo compiles the packages when COPY commands of the source folders have a static timestamp (see --keep-ts).
REMOVE_SOURCE_FINGERPRINTS:
Expand Down Expand Up @@ -102,6 +95,14 @@ get-jq:
chmod +x jq
SAVE ARTIFACT jq

# INSTALL_CARGO_SWEEP installs cargo-sweep if it doesn't exist already.
INSTALL_CARGO_SWEEP:
COMMAND
RUN if [ ! -f $CARGO_HOME/bin/cargo-sweep ]; then \
echo "Installing cargo sweep" ; \
cargo install cargo-sweep --root $CARGO_HOME; \
fi;

# RUN_WITH_CACHE runs the passed command with the CARGO caches mounted.
# Arguments:
# - command (required): Command to run, can be any expression.
Expand Down

0 comments on commit 1e5e15a

Please sign in to comment.