fix(api): update deploy-dev script to dist instead of src

This commit is contained in:
Pujit Mehrotra
2025-01-11 17:12:16 -05:00
committed by Pujit Mehrotra
parent bf3b00fbaf
commit 2327b00d30
2 changed files with 21 additions and 4 deletions

View File

@@ -7,3 +7,15 @@ default:
setup:
npm install
npm run container:build
# builds js files that can run on an unraid server
@build:
npm run build
# deploys to an unraid server
@deploy:
./scripts/deploy-dev.sh
# build & deploy
bd: build deploy

View File

@@ -23,11 +23,15 @@ fi
echo "$server_name" > "$state_file"
# Source directory path
source_directory="./src"
source_directory="./dist"
if [ ! -d "$source_directory" ]; then
echo "The src directory does not exist."
exit 1
echo "The dist directory does not exist. Attempting build..."
npm run build
if [ $? -ne 0 ]; then
echo "Build failed!"
exit 1
fi
fi
# Replace the value inside the rsync command with the user's input
@@ -56,4 +60,5 @@ elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
fi
# Exit with the rsync command's exit code
exit $exit_code
exit $exit_code