mirror of
https://github.com/gnekt/My-Brain-Is-Full-Crew.git
synced 2026-09-11 00:06:23 +00:00
refactor: rename --framework to --platform across all scripts and tests
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
# =============================================================================
|
||||
# scripts/build.sh — Run the framework adapter to populate dist/<framework>/
|
||||
# scripts/build.sh — Run the platform adapter to populate dist/<platform>/
|
||||
# =============================================================================
|
||||
# Usage: bash scripts/build.sh --framework <name>
|
||||
# Discovers available frameworks by listing adapters/ subdirectories.
|
||||
# Usage: bash scripts/build.sh --platform <name>
|
||||
# Discovers available platforms by listing adapters/ subdirectories.
|
||||
# =============================================================================
|
||||
set -eo pipefail
|
||||
|
||||
@@ -13,18 +13,18 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
||||
source "$SCRIPT_DIR/lib.sh"
|
||||
|
||||
# ── Parse args ─────────────────────────────────────────────────────────────
|
||||
FRAMEWORK="claude-code"
|
||||
PLATFORM="claude-code"
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case "$1" in
|
||||
--framework) FRAMEWORK="$2"; shift 2 ;;
|
||||
--platform) PLATFORM="$2"; shift 2 ;;
|
||||
*) die "Unknown argument: $1" ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# ── Validate framework ─────────────────────────────────────────────────────
|
||||
if [[ ! -d "$REPO_ROOT/adapters/$FRAMEWORK" ]]; then
|
||||
# ── Validate platform ─────────────────────────────────────────────────────
|
||||
if [[ ! -d "$REPO_ROOT/adapters/$PLATFORM" ]]; then
|
||||
AVAILABLE="$(ls "$REPO_ROOT/adapters/" 2>/dev/null | grep -v '^lib.sh$' | tr '\n' ' ')"
|
||||
die "Unknown framework: $FRAMEWORK. Available: $AVAILABLE"
|
||||
die "Unknown platform: $PLATFORM. Available: $AVAILABLE"
|
||||
fi
|
||||
|
||||
# ── Check dependencies ─────────────────────────────────────────────────────
|
||||
@@ -34,10 +34,10 @@ command -v jq >/dev/null 2>&1 || die "jq is required for the build (install via
|
||||
# shellcheck source=adapters/lib.sh
|
||||
source "$REPO_ROOT/adapters/lib.sh"
|
||||
# shellcheck source=/dev/null
|
||||
source "$REPO_ROOT/adapters/$FRAMEWORK/adapter.sh"
|
||||
source "$REPO_ROOT/adapters/$PLATFORM/adapter.sh"
|
||||
|
||||
# ── Run the build ──────────────────────────────────────────────────────────
|
||||
DIST_DIR="$REPO_ROOT/dist/$FRAMEWORK"
|
||||
info "Building $FRAMEWORK → $DIST_DIR"
|
||||
DIST_DIR="$REPO_ROOT/dist/$PLATFORM"
|
||||
info "Building $PLATFORM → $DIST_DIR"
|
||||
adapter_build "$REPO_ROOT" "$DIST_DIR"
|
||||
success "Build complete"
|
||||
|
||||
Reference in New Issue
Block a user