Skip to content

Commit 628774b

Browse files
committed
LMAO
1 parent 0472164 commit 628774b

File tree

1 file changed

+26
-13
lines changed

1 file changed

+26
-13
lines changed

sites/mainweb/start.sh

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,33 @@
11
#!/bin/bash
2-
3-
# A simple script to build a project using pnpm turbo
4-
# and then start the development server.
5-
6-
# Exit immediately if a command exits with a non-zero status
72
set -e
83

94
echo "Starting project build with pnpm turbo build..."
10-
# 1. Execute the build command
115
pnpm turbo build
126

13-
echo "Build complete. Starting development server with pnpm run dev..."
14-
# 2. Execute the development server command
15-
# This command is expected to run indefinitely (until manually stopped)
16-
pnpm run dev
7+
echo "Build complete."
8+
9+
read -p "Do you want to deploy to Firebase Hosting now? (y/N): " DEPLOY_ANSWER
10+
11+
if [[ "$DEPLOY_ANSWER" =~ ^[Yy]$ ]]; then
12+
echo "Deploying to Firebase Hosting..."
1713

18-
# The script will only reach this point if the 'pnpm run dev' command
19-
# exits for some reason (e.g., if it's not a continuous process)
20-
echo "Development server process has ended."
14+
if ! command -v firebase &> /dev/null; then
15+
echo "Firebase CLI not found. Installing..."
16+
pnpm add -g firebase-tools
17+
fi
18+
19+
if ! firebase login:list | grep -q "Logged in"; then
20+
echo "Logging into Firebase..."
21+
firebase login
22+
fi
23+
24+
firebase deploy --only hosting --project dsgt-website
25+
echo "Deployment complete!"
26+
else
27+
echo "Skipping Firebase deploy."
28+
fi
29+
30+
echo "Starting development server with pnpm run dev..."
31+
pnpm run dev
32+
n
33+
echo "Development server process has ended."

0 commit comments

Comments
 (0)