File tree Expand file tree Collapse file tree 1 file changed +26
-13
lines changed
Expand file tree Collapse file tree 1 file changed +26
-13
lines changed Original file line number Diff line number Diff line change 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
72set -e
83
94echo " Starting project build with pnpm turbo build..."
10- # 1. Execute the build command
115pnpm 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."
You can’t perform that action at this time.
0 commit comments