Skip to content

Commit

Permalink
fix(rust): Purge fingerprints fixes (#328)
Browse files Browse the repository at this point in the history
* fix(rust): Bring upstream rust earthly changes into the rust builders

* fix(rust): Add arguments to tune the rust builder to +SETUP

* fix(rust): Add --keep-ts to rust example projects

* refactor(rust): Move the FINGERPRINT_SRC function from cat-libs to cat-ci

* fix(rust): Try and set unique cache prefixes per repo.

* fix(rust): Remove OS identifier from the cache_prefix

* fix(rust): Make the cache architecture aware

* fix(rust): Add a changeable cache version tag

* fix(rust): By default, don't keep fingerprints in rust builds

* fix(rust): Fix bug in removing src fingerprints

* fix(cspell): spelling

* fix(rust): Only warn if a vulnerability is detected.

* fix(rust): Don't default STD_CONFIG to use the installer target.

* ci(rust): Don't purge fingerprints if we fail to change to the directory (probable race)
  • Loading branch information
stevenj authored Oct 5, 2024
1 parent f05a30b commit b26c3d4
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions earthly/rust/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,9 @@ REMOVE_SOURCE_FINGERPRINTS:
source_libs=$(find . -name Cargo.toml -exec bash -c '/tmp/tomljson {} | /tmp/jq -r .package.name; printf "\n"' \;) ; \
fingerprint_folders=$(find target -name .fingerprint) ; \
for fingerprint_folder in $fingerprint_folders; do \
echo $fingerprint_folder; \
mkdir -p $fingerprint_folder; \
cd $fingerprint_folder; \
for source_lib in $source_libs; do \
find . -maxdepth 1 -regex "\./$source_lib-[^-]+" -exec bash -c 'echo "deleting $(readlink -f {})"; rm -rf {}' \; ; \
done \
if cd $fingerprint_folder ; then \
for source_lib in $source_libs; do \
find . -maxdepth 1 -regex "\./$source_lib-[^-]+" -exec bash -c 'echo "deleting $(readlink -f {})"; rm -rf {}' \; ; \
done \
fi; \
done;

0 comments on commit b26c3d4

Please sign in to comment.