This commit is contained in:
Donald Zou 2024-10-06 23:09:55 +08:00
parent 87696a2e6c
commit 56744cec7b
2 changed files with 9 additions and 12 deletions

View File

@ -1,6 +1,4 @@
#!/bin/bash
# Step 1: Run vite build
echo "Running vite build..."
if vite build; then
echo "Vite build successful."
@ -10,17 +8,16 @@ else
fi
echo "Checking for changes to commit..."
if git diff-index --quiet HEAD --; then
echo "No changes to commit. Skipping commit."
else
if git commit -a; then
echo "Git commit successful."
else
echo "Git commit failed. Exiting."
exit 1
fi
echo "Git commit successful."
else
echo "Git commit failed. Exiting."
exit 1
fi
else
echo "No changes to commit. Skipping commit."
fi
# Step 3: Push changes to remote
echo "Pushing changes to remote..."
if git push; then
echo "Git push successful."

View File

@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "./build.sh",
"buildcommitpush": "./build.sh",
"build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && electron-builder --mac --win",
"preview": "vite preview"
},