fix(scripts): exclude python venvs from archive builds; add platform.3 support
cache-v0.sh / build-archives.sh: exclude venv/.venv/__pycache__ and other python caches. A stray @services/ml-moderation-python/venv was 9.58 GB — 95.9% — of the platform.0 archive; rebuilt platform.0 is now 337 MB. extract-archive.sh / build-archives.sh / @platform/CLAUDE.md: recognize the platform.3 (@atlilith) archive that the tooling previously ignored. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
cc0b68c2c1
commit
340f71519a
4 changed files with 13 additions and 7 deletions
|
|
@ -28,7 +28,7 @@ See `../DESIGN.md §4` for the canonical directory tree. Quick map:
|
|||
| `infrastructure/ports.yaml` | Single source of truth for ports |
|
||||
| `infrastructure/.env.ports` | Generated; do not edit by hand |
|
||||
| `infrastructure/sql/migrations/*.sql` | platform.db schema migrations |
|
||||
| `scripts/extract-archive.sh` | Mine code from `.archive/platform.{0,1,2}` tarballs |
|
||||
| `scripts/extract-archive.sh` | Mine code from `.archive/platform.{0,1,2,3}` tarballs |
|
||||
| `scripts/sync-ports.sh` | Regenerate `.env.ports` from `ports.yaml` |
|
||||
| `deployments/@domains/*` | Per-brand deploy configs |
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
# Build the frozen v1 and v2 archives from their source paths on apricot.
|
||||
# Build the frozen v1, v2, and v3 archives from their source paths on apricot.
|
||||
set -euo pipefail
|
||||
REPO_ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
|
||||
ARCHIVE_DIR="$REPO_ROOT/.archive"
|
||||
|
|
@ -8,6 +8,8 @@ EXCLUDES=(
|
|||
--exclude='.git' --exclude='.gitlab-ci-local' --exclude='.playwright-mcp'
|
||||
--exclude='.turbo' --exclude='.next' --exclude='dist' --exclude='build' --exclude='out'
|
||||
--exclude='node_modules' --exclude='.pnpm-store' --exclude='.yarn/cache' --exclude='.cache'
|
||||
--exclude='venv' --exclude='.venv' --exclude='__pycache__' --exclude='*.pyc' --exclude='*.pyo'
|
||||
--exclude='.pytest_cache' --exclude='.mypy_cache' --exclude='.ruff_cache' --exclude='*.egg-info' --exclude='.tox'
|
||||
--exclude='ml-service' --exclude='models' --exclude='checkpoints' --exclude='weights'
|
||||
--exclude='training/data' --exclude='training_data' --exclude='captcha-solver'
|
||||
--exclude='*.gguf' --exclude='*.safetensors' --exclude='*.bin' --exclude='*.ckpt'
|
||||
|
|
@ -30,4 +32,5 @@ build_archive() {
|
|||
}
|
||||
build_archive "platform.1" "$HOME/Code/@projects/@lilith/lilith-platform"
|
||||
build_archive "platform.2" "$HOME/Code/@projects/@lilith/lilith-platform.live"
|
||||
build_archive "platform.3" "$HOME/Code/@projects/@atlilith"
|
||||
echo; echo "built archives:"; ls -lh "$ARCHIVE_DIR"/*.tar.zst 2>/dev/null || true
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@ EXCLUDES=(
|
|||
--exclude='.git' --exclude='.gitlab-ci-local' --exclude='.playwright-mcp'
|
||||
--exclude='.turbo' --exclude='.next' --exclude='dist' --exclude='build' --exclude='out'
|
||||
--exclude='node_modules' --exclude='.pnpm-store' --exclude='.yarn/cache' --exclude='.cache'
|
||||
--exclude='venv' --exclude='.venv' --exclude='__pycache__' --exclude='*.pyc' --exclude='*.pyo'
|
||||
--exclude='.pytest_cache' --exclude='.mypy_cache' --exclude='.ruff_cache' --exclude='*.egg-info' --exclude='.tox'
|
||||
--exclude='ml-service' --exclude='models' --exclude='checkpoints' --exclude='weights'
|
||||
--exclude='training/data' --exclude='training_data' --exclude='captcha-solver'
|
||||
--exclude='*.gguf' --exclude='*.safetensors' --exclude='*.bin' --exclude='*.ckpt'
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
# extract-archive.sh — mine code from an archived prior platform version.
|
||||
#
|
||||
# Tarballs live in <repo>/.archive/platform.{0,1,2}.tar.zst (LFS-tracked).
|
||||
# Tarballs live in <repo>/.archive/platform.{0,1,2,3}.tar.zst (LFS-tracked).
|
||||
# Extracts to /tmp/cocottetech-archive/<name>/ so the working tree stays clean.
|
||||
#
|
||||
# Usage: ./scripts/extract-archive.sh <platform.0|platform.1|platform.2>
|
||||
# Usage: ./scripts/extract-archive.sh <platform.0|platform.1|platform.2|platform.3>
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 <platform.0|platform.1|platform.2>" >&2
|
||||
echo "Usage: $0 <platform.0|platform.1|platform.2|platform.3>" >&2
|
||||
echo "" >&2
|
||||
echo " platform.0 — egirl-platform (viky-era)" >&2
|
||||
echo " platform.1 — lilith-platform (V1, 54-feature SaaS)" >&2
|
||||
echo " platform.2 — lilith-platform.live (V2, Quinn-personal, currently in prod)" >&2
|
||||
echo " platform.3 — @atlilith (V3, brief intermediate workspace)" >&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
|
|
@ -23,7 +24,7 @@ fi
|
|||
|
||||
name="$1"
|
||||
case "$name" in
|
||||
platform.0|platform.1|platform.2) ;;
|
||||
platform.0|platform.1|platform.2|platform.3) ;;
|
||||
*) usage ;;
|
||||
esac
|
||||
|
||||
|
|
@ -37,7 +38,7 @@ dest="/tmp/cocottetech-archive/${name}"
|
|||
if [[ ! -f "$archive" ]]; then
|
||||
echo "error: $archive not found." >&2
|
||||
echo "Tarballs not yet built. On apricot, run:" >&2
|
||||
echo " ./scripts/build-archives.sh # for platform.1 + platform.2" >&2
|
||||
echo " ./scripts/build-archives.sh # for platform.{1,2,3}" >&2
|
||||
echo " ./scripts/cache-v0.sh # for platform.0 (from NFS)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue