mirror of
https://github.com/unraid/api.git
synced 2026-01-04 23:50:37 -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:
|
setup:
|
||||||
npm install
|
npm install
|
||||||
npm run container:build
|
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"
|
echo "$server_name" > "$state_file"
|
||||||
|
|
||||||
# Source directory path
|
# Source directory path
|
||||||
source_directory="./src"
|
source_directory="./dist"
|
||||||
|
|
||||||
if [ ! -d "$source_directory" ]; then
|
if [ ! -d "$source_directory" ]; then
|
||||||
echo "The src directory does not exist."
|
echo "The dist directory does not exist. Attempting build..."
|
||||||
exit 1
|
npm run build
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Build failed!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Replace the value inside the rsync command with the user's input
|
# Replace the value inside the rsync command with the user's input
|
||||||
@@ -56,4 +60,5 @@ elif [[ "$OSTYPE" == "msys" || "$OSTYPE" == "win32" ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Exit with the rsync command's exit code
|
# Exit with the rsync command's exit code
|
||||||
exit $exit_code
|
exit $exit_code
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user