mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-05-17 01:00:24 +00:00
Open WebUI: reset code base before pulling update (#2948)
Some checks are pending
Auto Update .app-files / update-app-files (push) Waiting to run
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Frontend CI/CD / build (push) Waiting to run
Frontend CI/CD / deploy (push) Blocked by required conditions
Some checks are pending
Auto Update .app-files / update-app-files (push) Waiting to run
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Frontend CI/CD / build (push) Waiting to run
Frontend CI/CD / deploy (push) Blocked by required conditions
* fix: hard reset codebase before pulling * backup data folder just in case * bad path fix * another safety layer * final touches * i'm dumb
This commit is contained in:
parent
a640814ae0
commit
6ad1ea004f
@ -29,6 +29,11 @@ function update_script() {
|
|||||||
fi
|
fi
|
||||||
msg_info "Updating ${APP} (Patience)"
|
msg_info "Updating ${APP} (Patience)"
|
||||||
cd /opt/open-webui
|
cd /opt/open-webui
|
||||||
|
mkdir /opt/open-webui-backup
|
||||||
|
cp -rf /opt/open-webui/backend/data /opt/open-webui-backup
|
||||||
|
git add -A
|
||||||
|
$STD git stash
|
||||||
|
$STD git reset --hard
|
||||||
output=$(git pull --no-rebase)
|
output=$(git pull --no-rebase)
|
||||||
if echo "$output" | grep -q "Already up to date."; then
|
if echo "$output" | grep -q "Already up to date."; then
|
||||||
msg_ok "$APP is already up to date."
|
msg_ok "$APP is already up to date."
|
||||||
@ -40,6 +45,8 @@ function update_script() {
|
|||||||
$STD npm run build
|
$STD npm run build
|
||||||
cd ./backend
|
cd ./backend
|
||||||
$STD pip install -r requirements.txt -U
|
$STD pip install -r requirements.txt -U
|
||||||
|
cp -rf /opt/open-webui-backup/* /opt/open-webui/backend
|
||||||
|
$STD git stash pop
|
||||||
systemctl start open-webui.service
|
systemctl start open-webui.service
|
||||||
msg_ok "Updated Successfully"
|
msg_ok "Updated Successfully"
|
||||||
exit
|
exit
|
||||||
|
Loading…
x
Reference in New Issue
Block a user