forked from defunkt/toes
Fix tar macOS compatibility and add deploy logs
This commit is contained in:
parent
70d9fd6fbb
commit
be6d4f58ff
|
|
@ -56,7 +56,7 @@ echo ">> Staging release"
|
||||||
mkdir -p "$STAGING"
|
mkdir -p "$STAGING"
|
||||||
|
|
||||||
# Source (excluding dev artifacts)
|
# Source (excluding dev artifacts)
|
||||||
tar -C "$ROOT" \
|
COPYFILE_DISABLE=1 tar -C "$ROOT" \
|
||||||
--no-xattrs \
|
--no-xattrs \
|
||||||
--exclude='node_modules' \
|
--exclude='node_modules' \
|
||||||
--exclude='.git' \
|
--exclude='.git' \
|
||||||
|
|
@ -79,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 --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"
|
rm -rf "$STAGING"
|
||||||
|
|
||||||
SIZE=$(du -h "dist/toes-$VERSION.tar.gz" | cut -f1)
|
SIZE=$(du -h "dist/toes-$VERSION.tar.gz" | cut -f1)
|
||||||
|
|
|
||||||
|
|
@ -29,10 +29,12 @@ DEST=~/toes
|
||||||
APPS_DIR=~/apps
|
APPS_DIR=~/apps
|
||||||
DATA_DIR=~/data
|
DATA_DIR=~/data
|
||||||
|
|
||||||
|
echo ">> Extracting"
|
||||||
mkdir -p "\$DEST"
|
mkdir -p "\$DEST"
|
||||||
tar xzf "/tmp/$FILENAME" --strip-components=1 -C "\$DEST"
|
tar xzf "/tmp/$FILENAME" --strip-components=1 -C "\$DEST"
|
||||||
rm "/tmp/$FILENAME"
|
rm "/tmp/$FILENAME"
|
||||||
|
|
||||||
|
echo ">> Installing dependencies"
|
||||||
cd "\$DEST"
|
cd "\$DEST"
|
||||||
~/.bun/bin/bun install > /dev/null 2>&1
|
~/.bun/bin/bun install > /dev/null 2>&1
|
||||||
|
|
||||||
|
|
@ -40,6 +42,7 @@ cd "\$DEST"
|
||||||
REPOS_DIR="\$DATA_DIR/repos"
|
REPOS_DIR="\$DATA_DIR/repos"
|
||||||
mkdir -p "\$REPOS_DIR" "\$APPS_DIR"
|
mkdir -p "\$REPOS_DIR" "\$APPS_DIR"
|
||||||
|
|
||||||
|
echo ">> Installing bundled apps"
|
||||||
pids=()
|
pids=()
|
||||||
for app_dir in "\$DEST"/apps/*/; do
|
for app_dir in "\$DEST"/apps/*/; do
|
||||||
app=\$(basename "\$app_dir")
|
app=\$(basename "\$app_dir")
|
||||||
|
|
@ -53,10 +56,11 @@ for app_dir in "\$DEST"/apps/*/; do
|
||||||
done
|
done
|
||||||
for pid in "\${pids[@]}"; do wait "\$pid"; 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
|
cp -a "\$DEST"/dist/repos/*.git "\$REPOS_DIR/" 2>/dev/null || true
|
||||||
sudo install -m 755 "\$DEST/dist/toes" /usr/local/bin/toes
|
sudo install -m 755 "\$DEST/dist/toes" /usr/local/bin/toes
|
||||||
|
|
||||||
|
echo ">> Restarting toes"
|
||||||
sudo systemctl restart toes
|
sudo systemctl restart toes
|
||||||
echo ">> Done"
|
echo ">> Done"
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user