mirror of
https://github.com/donaldzou/WGDashboard.git
synced 2024-11-22 15:20:09 +01:00
Added custom build.sh
This commit is contained in:
parent
4e5638df36
commit
79f1c20f8a
32
src/static/app/build.sh
Executable file
32
src/static/app/build.sh
Executable file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Step 1: Run vite build
|
||||||
|
echo "Running vite build..."
|
||||||
|
if vite build; then
|
||||||
|
echo "Vite build successful."
|
||||||
|
else
|
||||||
|
echo "Vite build failed. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Step 2: Check for changes and commit
|
||||||
|
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
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Step 3: Push changes to remote
|
||||||
|
echo "Pushing changes to remote..."
|
||||||
|
if git push; then
|
||||||
|
echo "Git push successful."
|
||||||
|
else
|
||||||
|
echo "Git push failed. Exiting."
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -5,7 +5,7 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build && git commit -a && git push",
|
"build": "./build.sh",
|
||||||
"build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && electron-builder --mac --win",
|
"build electron": "vite build && vite build --mode electron && cd ../../../../WGDashboard-Desktop && electron-builder --mac --win",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user