peppa/packages/cli/bin/peppa
Асель 03aee432fb PEP-18: separate Peppa prod — release dir, PM button, DB backup, auto-rollback
- scripts/peppa-release.sh: ~/peppa/{repo.git,releases/<sha>,current,shared/.env};
  install → next build → checked DB backup → migrate → switch current → kickstart →
  health (/api/health commit + fresh heartbeats) → rollback; --queue, --check, --no-restart
- runner/platform-release.ts: deployProd for the platform project (PEPPA_PLATFORM_KEY=PEP)
  queues a request for launchd quest.telecom.peppa.release; offer after green main
- CLI: peppa db backup [file], peppa release report; backupDb verifies the copy
- install-launchd.sh: wait for unload after bootout (no "Bootstrap failed: 5"),
  release agent (QueueDirectories), PEPPA_ROOT in agents
- bin wrappers: logical root so hooks/credential.helper point at ~/peppa/current
- mock-launchctl, mock-pnpm; e2e platform-release.test.ts; OpenSpec pep-18-peppa-prod

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-13 17:58:34 +05:00

8 lines
568 B
Bash
Executable File

#!/usr/bin/env bash
# Logical root (PEP-18): only the bin's own symlink (~/.local/bin) is followed, so a launch
# through ~/peppa/current keeps that path in hooks and git config instead of the release dir.
_b="$0"; [ -L "$_b" ] && { _l="$(readlink "$_b")"; if [ "${_l#/}" != "$_l" ]; then _b="$_l"; else _b="$(dirname "$_b")/$_l"; fi; }
PEPPA_ROOT="$(cd "$(dirname "$_b")/../../.." && pwd)"; unset _b _l
. "$PEPPA_ROOT/scripts/lib/load-env.sh"
exec "${PEPPA_NODE:-node}" --import "$PEPPA_ROOT/scripts/lib/require-node.mjs" "$PEPPA_ROOT/packages/cli/src/index.ts" "$@"