forked from johanmha/code-brief
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-local.sh
More file actions
executable file
·51 lines (41 loc) · 1.46 KB
/
run-local.sh
File metadata and controls
executable file
·51 lines (41 loc) · 1.46 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
48
49
50
51
#!/bin/bash
# Code Brief - Local Test Runner
#
# Usage: ./run-local.sh
#
# Make sure to set these environment variables:
# export GEMINI_API_KEY="your-key"
# export SLACK_WEBHOOK_URL="your-webhook"
echo "═══════════════════════════════════════"
echo " Code Brief - Local Test Runner"
echo "═══════════════════════════════════════"
echo ""
# Check if environment variables are set
if [ -z "$GEMINI_API_KEY" ]; then
echo "❌ Error: GEMINI_API_KEY environment variable not set"
echo " Set it with: export GEMINI_API_KEY=\"your-key\""
exit 1
fi
if [ -z "$SLACK_WEBHOOK_URL" ]; then
echo "❌ Error: SLACK_WEBHOOK_URL environment variable not set"
echo " Set it with: export SLACK_WEBHOOK_URL=\"your-webhook\""
exit 1
fi
echo "✓ Environment variables set"
echo ""
# Build the project
echo "Building project..."
mvn clean package -DskipTests
if [ $? -ne 0 ]; then
echo "❌ Build failed"
exit 1
fi
echo "✓ Build successful"
echo ""
# Run the application
echo "Running Code Brief..."
java -jar target/code-brief.jar
echo ""
echo "═══════════════════════════════════════"
echo " Done!"
echo "═══════════════════════════════════════"