From 56744cec7bec2d7259c3114c7fb4ba83500f900c Mon Sep 17 00:00:00 2001 From: Donald Zou Date: Sun, 6 Oct 2024 23:09:55 +0800 Subject: [PATCH] Commit --- src/static/app/build.sh | 19 ++++++++----------- src/static/app/package.json | 2 +- 2 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/static/app/build.sh b/src/static/app/build.sh index 82cea4ee..e61f2469 100755 --- a/src/static/app/build.sh +++ b/src/static/app/build.sh @@ -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." diff --git a/src/static/app/package.json b/src/static/app/package.json index b5e3c4c8..83f3f4da 100644 --- a/src/static/app/package.json +++ b/src/static/app/package.json @@ -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" },