Skip to content

Commit

Permalink
Build all before copying assets
Browse files Browse the repository at this point in the history
  • Loading branch information
joaofl committed Apr 15, 2024
1 parent c9a5499 commit 0c654a9
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cross-build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,21 @@ mkdir assets 2>/dev/null || true
for target in "${TARGETS[@]}"; do
rustup target add $target

echo "Cross-compiling the headless version for $target..."
cargo zigbuild --release --target "$target" --no-default-features --jobs $(nproc)

echo "Cross-compiling gui version for $target..."
cargo zigbuild --release --target "$target" --jobs $(nproc)

echo "Copying $target assets"
echo "Cross-compiling the headless version for $target..."
cargo zigbuild --release --target "$target" --no-default-features --jobs $(nproc)
done

for target in "${TARGETS[@]}"; do
if [ $target = "x86_64-pc-windows-gnu" ]; then
ext=".exe"
else
ext=""
fi

echo "Copying $target assets"
cp -v target/${target}/release/quick-serve${ext} assets/quick-serve-${target}${ext} 2>/dev/null
cp -v target/${target}/release/quick-serve-headless${ext} assets/quick-serve-headless-${target}${ext} 2>/dev/null
done
Expand Down

0 comments on commit 0c654a9

Please sign in to comment.