Monorepo for Aesthetic.Computer
aesthetic.computer
1#!/usr/bin/env fish
2# Deploy Aesthetic Computer Tangled Knot
3# Wraps deploy.sh with vault environment loading
4
5set SCRIPT_DIR (dirname (status --current-filename))
6set VAULT_DIR (cd "$SCRIPT_DIR/../../../aesthetic-computer-vault" 2>/dev/null && pwd; or echo "")
7
8echo "╔════════════════════════════════════════════════════════╗"
9echo "║ Aesthetic Computer Knot Deployment (Tangled) ║"
10echo "╚════════════════════════════════════════════════════════╝"
11echo ""
12
13# Load knot-specific vault env
14if test -f "$VAULT_DIR/at/knot.env"
15 echo "✓ Loading knot config from vault..."
16 for line in (cat "$VAULT_DIR/at/knot.env" | grep -v '^#' | grep -v '^$')
17 set -l parts (string split '=' -- $line)
18 if test (count $parts) -ge 2
19 set -gx $parts[1] (string join '=' -- $parts[2..-1])
20 end
21 end
22else
23 echo "! Vault knot config not found: $VAULT_DIR/at/knot.env"
24 echo ""
25 echo " Create it with:"
26 echo " KNOT_OWNER_DID=did:plc:your-did-here"
27 echo ""
28 echo " Find your DID at https://tangled.org/settings"
29 echo ""
30
31 # Default to @aesthetic.computer DID (jeffrey)
32 if test -z "$KNOT_OWNER_DID"
33 set -gx KNOT_OWNER_DID "did:plc:k3k3wknzkcnekbnyde4dbatz"
34 echo " Using default DID: $KNOT_OWNER_DID"
35 end
36end
37
38# Load shared deploy env (for Cloudflare creds, DO token, etc.)
39if test -f "$VAULT_DIR/at/deploy.env"
40 echo "✓ Loading shared deploy config..."
41 for line in (cat "$VAULT_DIR/at/deploy.env" | grep -v '^#' | grep -v '^$')
42 set -l parts (string split '=' -- $line)
43 if test (count $parts) -ge 2
44 set -gx $parts[1] (string join '=' -- $parts[2..-1])
45 end
46 end
47end
48
49# Export for bash script
50export KNOT_OWNER_DID
51export DROPLET_IP
52
53echo ""
54echo "→ Starting knot deployment..."
55echo ""
56
57set -x AUTO_CONFIRM yes
58
59bash "$SCRIPT_DIR/deploy.sh" $argv