Fix tar macOS compatibility and add deploy logs

This commit is contained in:
Chris Wanstrath 2026-05-13 23:41:27 -07:00
parent 70d9fd6fbb
commit be6d4f58ff
2 changed files with 7 additions and 3 deletions

View File

@ -56,7 +56,7 @@ echo ">> Staging release"
mkdir -p "$STAGING"
# Source (excluding dev artifacts)
tar -C "$ROOT" \
COPYFILE_DISABLE=1 tar -C "$ROOT" \
--no-xattrs \
--exclude='node_modules' \
--exclude='.git' \
@ -79,7 +79,7 @@ cp src/lib/templates.data.ts "$STAGING/src/lib/templates.data.ts"
# ── Tarball ──────────────────────────────────────────────
echo ">> Creating tarball"
tar -C dist --no-xattrs -czf "dist/toes-$VERSION.tar.gz" "toes-$VERSION"
COPYFILE_DISABLE=1 tar -C dist --no-xattrs -czf "dist/toes-$VERSION.tar.gz" "toes-$VERSION"
rm -rf "$STAGING"
SIZE=$(du -h "dist/toes-$VERSION.tar.gz" | cut -f1)

View File

@ -29,10 +29,12 @@ DEST=~/toes
APPS_DIR=~/apps
DATA_DIR=~/data
echo ">> Extracting"
mkdir -p "\$DEST"
tar xzf "/tmp/$FILENAME" --strip-components=1 -C "\$DEST"
rm "/tmp/$FILENAME"
echo ">> Installing dependencies"
cd "\$DEST"
~/.bun/bin/bun install > /dev/null 2>&1
@ -40,6 +42,7 @@ cd "\$DEST"
REPOS_DIR="\$DATA_DIR/repos"
mkdir -p "\$REPOS_DIR" "\$APPS_DIR"
echo ">> Installing bundled apps"
pids=()
for app_dir in "\$DEST"/apps/*/; do
app=\$(basename "\$app_dir")
@ -53,10 +56,11 @@ for app_dir in "\$DEST"/apps/*/; do
done
for pid in "\${pids[@]}"; do wait "\$pid"; done
# Pre-built repos and CLI
echo ">> Installing CLI and repos"
cp -a "\$DEST"/dist/repos/*.git "\$REPOS_DIR/" 2>/dev/null || true
sudo install -m 755 "\$DEST/dist/toes" /usr/local/bin/toes
echo ">> Restarting toes"
sudo systemctl restart toes
echo ">> Done"
SCRIPT