From a1c5dc3e92eea686af4e0f437146797aeb3a5736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Wed, 13 May 2026 09:56:07 +0000 Subject: [PATCH] chore: remove link-all.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Local symlink workflow replaced by Gitea npm registry publish flow. Signed-off-by: 小橘 --- scripts/link-all.sh | 49 --------------------------------------------- 1 file changed, 49 deletions(-) delete mode 100755 scripts/link-all.sh diff --git a/scripts/link-all.sh b/scripts/link-all.sh deleted file mode 100755 index 92e3568..0000000 --- a/scripts/link-all.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/usr/bin/env bash -# Link / unlink all @uncaged/* packages from the workflow monorepo. -# -# Usage: -# ./scripts/link-all.sh # Register all packages (run from monorepo root) -# ./scripts/link-all.sh --consume # Link all packages into CWD's project -# ./scripts/link-all.sh --unlink # Unregister all packages and restore CWD's deps - -set -euo pipefail - -SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" -MONOREPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" - -# Iterate package dirs, calling callback(dir, name) for each -each_pkg() { - local cb="$1" - for dir in "$MONOREPO_ROOT"/packages/*/; do - [[ -f "$dir/package.json" ]] || continue - local name - name=$(grep -m1 '"name"' "$dir/package.json" | sed 's/.*: *"\(.*\)".*/\1/') - "$cb" "$dir" "$name" - done -} - -do_register() { printf " register %s\n" "$2"; (cd "$1" && bun link 2>&1) > /dev/null; } -do_consume() { printf " link %s\n" "$2"; (bun link "$2" 2>&1) > /dev/null; } -do_unlink() { printf " unlink %s\n" "$2"; (cd "$1" && bun unlink 2>&1) > /dev/null || true; } - -case "${1:-}" in - --consume) - each_pkg do_consume - echo "✅ All @uncaged/* packages linked into $(pwd)" - echo " ⚠️ Do NOT run 'bun install' after this — it will overwrite the links" - echo " To restore: $0 --unlink" - ;; - --unlink) - each_pkg do_unlink - if [[ -f "package.json" ]]; then - echo " reinstalling deps..." - bun install 2>&1 > /dev/null || true - fi - echo "✅ All @uncaged/* packages unlinked, deps restored" - ;; - *) - each_pkg do_register - echo "✅ All @uncaged/* packages registered" - echo " cd && $0 --consume" - ;; -esac