Skip to content

Commit

Permalink
ci: run 'yarn start' if NODE_ENV is prod
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Nov 4, 2024
1 parent 169f50d commit 1c0e083
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions start-server.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,25 @@
#!/bin/bash

PLANTUML_URL="https://github.com/plantuml/plantuml/releases/download/v1.2022.7/plantuml-1.2022.7.jar"
PLANTUML_FILE="plantuml.jar"

if [ ! -f "$PLANTUML_FILE" ]; then
echo "$PLANTUML_FILE not found. Downloading..."
curl -L -o "$PLANTUML_FILE" "$PLANTUML_URL"
echo "Downloaded $PLANTUML_FILE."
if [ $? -eq 0 ]; then
echo "Downloaded $PLANTUML_FILE successfully."
else
echo "Error downloading $PLANTUML_FILE. Check the URL or network connection."
exit 1
fi
else
echo "$PLANTUML_FILE already exists."
fi

yarn dev
if [ "$NODE_ENV" = "prod" ]; then
echo "Running in production mode..."
yarn start
else
echo "Running in development mode..."
yarn dev
fi

0 comments on commit 1c0e083

Please sign in to comment.