Add builder service: scaffold, ASC API, devices UI, fastlane profile manager
Phase 1-3 of the builder subsystem on the Mac mini: - Express + SQLite + sessions scaffolding, LAN-only service on port 3090 - App Store Connect JWT client (ES256 signing, devices/profiles/bundleIds) - Device management UI with Apple-side registration - Fastlane sigh wrapper with profile cache + auto-install to ~/Library/ - launchd plist + deploy script for Mac mini supervision
This commit is contained in:
35
builder/bin/deploy.sh
Executable file
35
builder/bin/deploy.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env bash
|
||||
# Deploy builder source from the dev workspace to the runtime location on the Mac mini.
|
||||
# Usage: ./bin/deploy.sh
|
||||
set -euo pipefail
|
||||
|
||||
DEV_DIR="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
RUN_DIR="/Users/m4mini/AppStoreBuilder/app"
|
||||
|
||||
echo "Deploying builder from $DEV_DIR → $RUN_DIR"
|
||||
|
||||
rsync -a \
|
||||
--exclude node_modules \
|
||||
--exclude data \
|
||||
--exclude .env \
|
||||
--exclude bin/deploy.sh \
|
||||
"$DEV_DIR/" "$RUN_DIR/"
|
||||
|
||||
# Install/refresh deps if package.json changed
|
||||
if ! cmp -s "$DEV_DIR/package.json" "$RUN_DIR/package.json.last" 2>/dev/null; then
|
||||
(cd "$RUN_DIR" && npm install --production)
|
||||
cp "$DEV_DIR/package.json" "$RUN_DIR/package.json.last"
|
||||
fi
|
||||
|
||||
# Restart the launchd service
|
||||
UID_NUM=$(id -u)
|
||||
if launchctl print "gui/$UID_NUM/com.88oak.appstorebuilder" >/dev/null 2>&1; then
|
||||
launchctl kickstart -k "gui/$UID_NUM/com.88oak.appstorebuilder"
|
||||
echo "Service kickstarted"
|
||||
else
|
||||
echo "Service not loaded — bootstrap it with:"
|
||||
echo " launchctl bootstrap gui/$UID_NUM ~/Library/LaunchAgents/com.88oak.appstorebuilder.plist"
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
curl -s http://localhost:3090/api/health && echo ""
|
||||
Reference in New Issue
Block a user