From a9f8a3885d703daa36f326c7b8a5ebe8a3ac2123 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Tue, 17 Mar 2026 17:42:37 -0700 Subject: [PATCH] Remove deploy scripts and npm tasks --- package.json | 2 -- scripts/deploy.sh | 70 ----------------------------------------------- 2 files changed, 72 deletions(-) delete mode 100755 scripts/deploy.sh diff --git a/package.json b/package.json index 20b6861..05e254a 100644 --- a/package.json +++ b/package.json @@ -22,10 +22,8 @@ "cli:install": "bun cli:build && sudo cp dist/toes /usr/local/bin", "cli:link": "ln -sf $(pwd)/src/cli/index.ts ~/.bun/bin/toes", "cli:uninstall": "sudo rm /usr/local/bin", - "deploy": "./scripts/deploy.sh", "debug": "DEBUG=1 bun run dev", "dev": "bun run templates && rm -f pub/client/index.js && bun run --hot src/server/index.tsx", - "remote:deploy": "./scripts/deploy.sh", "remote:migrate": "bun run scripts/migrate.ts", "remote:install": "./scripts/remote-install.sh", "remote:logs": "./scripts/remote-logs.sh", diff --git a/scripts/deploy.sh b/scripts/deploy.sh deleted file mode 100755 index e607558..0000000 --- a/scripts/deploy.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env bash -set -e - -# Get absolute path of this script's directory -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -ROOT_DIR="$SCRIPT_DIR/.." - -# Load config -source "$ROOT_DIR/scripts/config.sh" - -git push origin main - -# SSH to target: pull, build, sync apps, restart -ssh "$SSH_HOST" bash <<'SCRIPT' -set -e - -DEST="${DEST:-$HOME/toes}" -APPS_DIR="${APPS_DIR:-$HOME/apps}" -DATA_DIR="${DATA_DIR:-$HOME/data}" -REPOS_DIR="$DATA_DIR/repos" - -cd "$DEST" && git checkout -- bun.lock && git pull origin main && bun install && rm -rf dist && bun run build && bun run cli:build && sudo cp dist/toes /usr/local/bin/toes - -echo "=> Syncing default apps..." -for app_dir in "$DEST"/apps/*/; do - app=$(basename "$app_dir") - [ -f "$app_dir/package.json" ] || continue - target="$APPS_DIR/$app" - mkdir -p "$target" - cp -a "$app_dir"/. "$target"/ - echo " $app" - (cd "$target" && bun install --frozen-lockfile 2>/dev/null || bun install) -done - -echo "=> Initializing bare repos..." -mkdir -p "$REPOS_DIR" -for app_dir in "$DEST"/apps/*/; do - app=$(basename "$app_dir") - [ -f "$app_dir/package.json" ] || continue - bare="$REPOS_DIR/$app.git" - - if [ ! -d "$bare" ]; then - git init --bare -b main "$bare" > /dev/null - git -C "$bare" config http.receivepack true - fi - - tmp=$(mktemp -d) - cp -a "$app_dir"/. "$tmp"/ - git -C "$tmp" init -b main > /dev/null 2>&1 - git -C "$tmp" add -A > /dev/null - git -C "$tmp" -c user.name=toes -c user.email=toes@localhost commit -m "deploy" > /dev/null 2>&1 - git -C "$tmp" push --force "$bare" main > /dev/null 2>&1 - rm -rf "$tmp" - echo " $app" -done - -sudo systemctl restart toes.service -SCRIPT - -b=$'\033[1m' d=$'\033[2m' g=$'\033[32m' c=$'\033[36m' r=$'\033[0m' - -echo "" -echo " ${b}${g}🐾 Deployed${r} to ${b}$SSH_HOST${r}" -echo " ${d}─────────────────────────────${r}" -echo "" -echo " Dashboard: ${c}$URL${r}" -echo "" -echo " ${d}Grab the CLI:${r}" -echo " ${c}curl -fsSL $URL/install | bash${r}" -echo ""