- Created scripts/prebuild.sh to consolidate all prebuild steps - Updated scripts/sync-doc-content.sh to aggregate docs from all services: - console.svc.plus → src/content/doc/01-console - accounts.svc.plus → src/content/doc/02-accounts - rag-server.svc.plus → src/content/doc/03-rag-server - postgresql.svc.plus → src/content/doc/04-postgresql - Auto-generates src/content/doc/index.md with service overview - Simplified package.json prebuild to single script call - Preserves TypeScript/Node.js scripts (generate-content.ts, build-contentlayer.mjs) This ensures documentation is always fresh from source repos during build.
38 lines
1004 B
Bash
Executable File
38 lines
1004 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
# Prebuild script for console.svc.plus
|
|
# This script runs all necessary preparation steps before building the application
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
cd "${SCRIPT_DIR}/.."
|
|
|
|
echo "======================================"
|
|
echo "Starting prebuild process..."
|
|
echo "======================================"
|
|
|
|
# Step 1: Sync documentation from service repositories
|
|
echo ""
|
|
echo "[1/4] Syncing documentation content..."
|
|
bash scripts/sync-doc-content.sh
|
|
|
|
# Step 2: Sync blog content
|
|
echo ""
|
|
echo "[2/4] Syncing blog content..."
|
|
bash scripts/sync-blog-content.sh
|
|
|
|
# Step 3: Generate static content (homepage, products)
|
|
echo ""
|
|
echo "[3/4] Generating static content..."
|
|
npx tsx scripts/generate-content.ts
|
|
|
|
# Step 4: Build contentlayer
|
|
echo ""
|
|
echo "[4/4] Building contentlayer..."
|
|
node scripts/build-contentlayer.mjs
|
|
|
|
echo ""
|
|
echo "======================================"
|
|
echo "Prebuild complete!"
|
|
echo "======================================"
|