-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: run 'yarn start' if NODE_ENV is prod
- Loading branch information
1 parent
169f50d
commit 1c0e083
Showing
1 changed file
with
15 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |