forked from block/proto-fleet
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.sh
More file actions
executable file
·35 lines (27 loc) · 858 Bytes
/
Copy pathdev.sh
File metadata and controls
executable file
·35 lines (27 loc) · 858 Bytes
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
#!/usr/bin/env bash
set -euo pipefail
echo "Starting Proto Fleet development environment..."
GIT_VERSION=$(git describe --tags --always --dirty 2>/dev/null || echo "dev")
BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
GIT_COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "development")
echo "Starting ProtoFleet client..."
(
cd client
VITE_VERSION="$GIT_VERSION" \
VITE_BUILD_DATE="$BUILD_DATE" \
VITE_COMMIT="$GIT_COMMIT" \
npm run dev:protoFleet
) & CLIENT_PID=$!
echo "Client PID: $CLIENT_PID"
echo "Starting server..."
(cd server && just dev) & SERVER_PID=$!
echo "Server PID: $SERVER_PID"
echo "Both processes started. Press Ctrl+C to stop both processes"
cleanup() {
echo "Stopping processes..."
kill $CLIENT_PID $SERVER_PID 2>/dev/null || true
wait
echo "All processes stopped"
}
trap cleanup EXIT INT TERM
wait