Skip to content

Commit

Permalink
Fix bug archiving dependencies (googleforgames#442)
Browse files Browse the repository at this point in the history
If there are ever multiple versions of a dependency in $CARGO_HOME the
`archive_dependencies.sh` script would fail.

This fixes this issue.
markmandel authored Nov 24, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 5bf35a8 commit 97a9fa0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions image/archive_dependencies.sh
Original file line number Diff line number Diff line change
@@ -31,10 +31,10 @@ rm dependencies-src.zip || true
dependencies=("slog-json")

zip="$(pwd)/dependencies-src.zip"

echo "Archiving dependencies to: $zip"
pushd "$CARGO_HOME/registry/src"
for d in "${dependencies[@]}"; do
path=$(find . -type d -name "$d-*")
echo "Archiving $d:$path"
zip -rv "$zip" "$path"
find . -type d -name "$d-*" | xargs -I {} zip -rv "$zip" "{}"
done
popd

0 comments on commit 97a9fa0

Please sign in to comment.