From a8abf5c28504fda63521839aa6cd497b71de49c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastien=20V=C3=A9nier?= Date: Thu, 7 Mar 2024 03:57:12 +0100 Subject: [PATCH] preview & prod script variations --- scripts/preview.sh.example | 8 +++++--- scripts/prod.sh.example | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/preview.sh.example b/scripts/preview.sh.example index 4252edb..267ba2d 100644 --- a/scripts/preview.sh.example +++ b/scripts/preview.sh.example @@ -14,9 +14,11 @@ export DISCORD_PUBLIC_KEY="" export NUXT_PUBLIC_DISCORD_CLIENT_ID="" # Build and start the production server in development environment -if [ "$1" = "skip-build" ]; then +if [ "$1" != "skip-build" ]; then echo 'Building project (preview)...' grep -m 1 "Total size" <(nuxt build) # Wait for second to last line from build process fi -echo 'Starting server (preview)...' -node .output/server/index.mjs +if [ "$1" != "build-only" ]; then + echo 'Starting server (preview)...' + node .output/server/index.mjs +fi diff --git a/scripts/prod.sh.example b/scripts/prod.sh.example index 8ba61ac..8ce572a 100644 --- a/scripts/prod.sh.example +++ b/scripts/prod.sh.example @@ -17,9 +17,11 @@ export DISCORD_PUBLIC_KEY="" export NUXT_PUBLIC_DISCORD_CLIENT_ID="" # Build and start the production server -if [ "$1" = "skip-build" ]; then +if [ "$1" != "skip-build" ]; then echo 'Building project...' grep -m 1 "Total size" <(nuxt build) # Wait for second to last line from build process fi -echo 'Starting server...' -node .output/server/index.mjs +if [ "$1" != "build-only" ]; then + echo 'Starting server...' + node .output/server/index.mjs +fi