mirror of
https://github.com/unraid/api.git
synced 2025-12-31 13:39:52 -06:00
fix(api): update deploy-dev script to dist instead of src
This commit is contained in:
committed by
Pujit Mehrotra
parent
bf3b00fbaf
commit
2327b00d30
12
api/justfile
12
api/justfile
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user