Multi-customer config system: - CUSTOMER env var selects customer (tianpu/zpark) - customers/tianpu/config.yaml — Tianpu branding, collectors, features - customers/zpark/config.yaml — Z-Park branding, Sungrow collector - GET /api/v1/branding endpoint for customer-specific branding - main.py loads customer config for app title, CORS, logging - Collector manager filters by customer's enabled collectors Z-Park (中关村医疗器械园) support: - Sungrow iSolarCloud API collector (sungrow_collector.py) - Z-Park device definitions (10 inverters, 8 combiner boxes, 22+ buildings) - Z-Park TOU pricing config (Beijing 2026 rates) - Z-Park seed script (seed_zpark.py) Gitea migration scripts (Mac Studio → labmac3): - 5 migration scripts + README in scripts/gitea-migration/ - Creates 3-repo structure: ems-core, tp-ems, zpark-ems Version: v1.0.0 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
28 lines
732 B
Bash
28 lines
732 B
Bash
#!/bin/bash
|
|
# Run this on each developer's machine
|
|
# Usage: cd tianpu-ems && bash path/to/04_update_developer_remotes.sh
|
|
|
|
echo "=== Updating Git remotes to labmac3 ==="
|
|
|
|
OLD_ORIGIN=$(git remote get-url origin 2>/dev/null)
|
|
echo "Current origin: $OLD_ORIGIN"
|
|
|
|
# Update origin to labmac3
|
|
git remote set-url origin http://192.168.1.77:3300/tianpu/tianpu-ems.git
|
|
|
|
# Keep old Mac Studio as backup remote
|
|
git remote remove mac-studio 2>/dev/null
|
|
git remote add mac-studio "$OLD_ORIGIN" 2>/dev/null
|
|
|
|
NEW_ORIGIN=$(git remote get-url origin)
|
|
echo "New origin: $NEW_ORIGIN"
|
|
|
|
# Test connectivity
|
|
echo ""
|
|
echo "Testing connection..."
|
|
git ls-remote origin HEAD 2>&1 | head -3
|
|
|
|
echo ""
|
|
echo "=== Done ==="
|
|
echo "You can now: git pull origin main"
|