Add --no-xattrs flag and reorder mkdir

This commit is contained in:
Chris Wanstrath 2026-05-13 23:33:34 -07:00
parent a8c4975ed5
commit 70d9fd6fbb

View File

@ -57,6 +57,7 @@ mkdir -p "$STAGING"
# Source (excluding dev artifacts) # Source (excluding dev artifacts)
tar -C "$ROOT" \ tar -C "$ROOT" \
--no-xattrs \
--exclude='node_modules' \ --exclude='node_modules' \
--exclude='.git' \ --exclude='.git' \
--exclude='dist' \ --exclude='dist' \
@ -67,9 +68,9 @@ tar -C "$ROOT" \
-cf - . | tar -C "$STAGING" -xf - -cf - . | tar -C "$STAGING" -xf -
# Pre-built artifacts # Pre-built artifacts
mkdir -p "$STAGING/pub" "$STAGING/dist"
cp -a pub/client "$STAGING/pub/client" cp -a pub/client "$STAGING/pub/client"
cp -a dist/repos "$STAGING/dist/repos" cp -a dist/repos "$STAGING/dist/repos"
mkdir -p "$STAGING/dist"
cp dist/toes-linux-arm64 "$STAGING/dist/toes" cp dist/toes-linux-arm64 "$STAGING/dist/toes"
# Generated templates (so the server doesn't need to generate them) # Generated templates (so the server doesn't need to generate them)
@ -78,7 +79,7 @@ cp src/lib/templates.data.ts "$STAGING/src/lib/templates.data.ts"
# ── Tarball ────────────────────────────────────────────── # ── Tarball ──────────────────────────────────────────────
echo ">> Creating tarball" echo ">> Creating tarball"
tar -C dist -czf "dist/toes-$VERSION.tar.gz" "toes-$VERSION" tar -C dist --no-xattrs -czf "dist/toes-$VERSION.tar.gz" "toes-$VERSION"
rm -rf "$STAGING" rm -rf "$STAGING"
SIZE=$(du -h "dist/toes-$VERSION.tar.gz" | cut -f1) SIZE=$(du -h "dist/toes-$VERSION.tar.gz" | cut -f1)