Monorepo for Aesthetic.Computer aesthetic.computer
at main 54 lines 1.5 kB view raw
1#!/usr/bin/env fish 2 3# Build and deploy KidLisp feed 4# This script loads secrets from vault and runs the build 5 6echo "🎨 Building KidLisp Feed" 7echo "========================" 8echo "" 9 10# Load environment variables from vault 11set vault_env /workspaces/aesthetic-computer/aesthetic-computer-vault/feed/.env 12 13if test -f $vault_env 14 echo "📦 Loading secrets from vault..." 15 # Export environment variables for fish (split on first = only, strip quotes) 16 for line in (cat $vault_env | grep -v '^#' | grep '=') 17 set -l parts (string split -m1 '=' $line) 18 set -l val (string trim -c '"' $parts[2]) 19 set -gx $parts[1] $val 20 end 21 echo "✅ Secrets loaded" 22 echo "" 23else 24 echo "❌ Error: Vault environment file not found at $vault_env" 25 echo " Please ensure aesthetic-computer-vault/feed/.env exists" 26 exit 1 27end 28 29# Check required variables 30if not set -q FEED_API_SECRET 31 echo "❌ Error: FEED_API_SECRET not set" 32 exit 1 33end 34 35if not set -q MONGODB_CONNECTION_STRING 36 echo "❌ Error: MONGODB_CONNECTION_STRING not set" 37 exit 1 38end 39 40# Run the build script 41echo "🚀 Running build script..." 42echo "" 43cd /workspaces/aesthetic-computer/feed 44node build-kidlisp-feed.mjs 45 46if test $status -eq 0 47 echo "" 48 echo "✅ Build complete!" 49 echo "🌐 View channel: https://feed.aesthetic.computer/api/v1/channels/$KIDLISP_CHANNEL_ID" 50else 51 echo "" 52 echo "❌ Build failed with exit code $status" 53 exit 1 54end