forked from halcycon/discord-stfc-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
Β·47 lines (38 loc) Β· 1.18 KB
/
Copy pathsetup.sh
File metadata and controls
executable file
Β·47 lines (38 loc) Β· 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Setup script for Discord STFC Tools
# This script automates the initial setup process
set -e
echo "π Setting up Discord STFC Tools..."
# Check if .env exists
if [ ! -f .env ]; then
echo "π Creating .env from template..."
cp .env.template .env
echo "β οΈ Please edit .env with your namespace IDs after running the KV creation commands"
fi
# Check if wrangler is installed
if ! command -v wrangler &> /dev/null; then
echo "β Wrangler CLI not found. Please install it first:"
echo " npm install -g wrangler"
exit 1
fi
# Install dependencies
echo "π¦ Installing dependencies..."
npm install
# Create KV namespaces
echo "ποΈ Creating KV namespaces..."
echo "Creating production namespace..."
npm run kv:create
echo "Creating preview namespace..."
npm run kv:create-preview
echo ""
echo "β
Setup complete!"
echo ""
echo "π Next steps:"
echo "1. Edit .env with the namespace IDs shown above"
echo "2. Run: npm run generate-config"
echo "3. Run: npm run migrate-kv"
echo "4. Run: npm run kv:upload"
echo "5. Run: npm run register-commands"
echo "6. Run: npm run deploy"
echo ""
echo "π‘ See KV_MIGRATION_GUIDE.md for detailed instructions"