finalize wizarr

This commit is contained in:
CanbiZ
2025-06-19 08:15:44 +02:00
parent 75e64829c7
commit 61113b399c
2 changed files with 10 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
# Copyright (c) 2021-2025 community-scripts ORG
# Author: vhsdream
# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE
@@ -29,8 +29,8 @@ function update_script() {
exit
fi
RELEASE=$(curl -s https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat /opt/wizarr_version.txt)" ]] || [[ ! -f /opt/wizarr_version.txt ]]; then
RELEASE=$(curl -fsSL https://api.github.com/repos/wizarrrr/wizarr/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ "${RELEASE}" != "$(cat ~/.wizarr 2>/dev/null)" ]] || [[ ! -f ~/.wizarr ]]; then
msg_info "Stopping $APP"
systemctl stop wizarr
msg_ok "Stopped $APP"
@@ -40,13 +40,11 @@ function update_script() {
$STD tar -czf "$BACKUP_FILE" /opt/wizarr/{.env,start.sh} /opt/wizarr/database/ &>/dev/null
msg_ok "Backup Created"
msg_info "Updating $APP to v${RELEASE}"
rm -rf /opt/wizarr
curl -fsSL "https://github.com/wizarrrr/wizarr/archive/refs/tags/${RELEASE}.zip" -o /tmp/"$RELEASE".zip
unzip -q /tmp/"$RELEASE".zip
mv wizarr-${RELEASE}/ /opt/wizarr
cd /opt/wizarr
setup_uv
fetch_and_deploy_gh_release "wizarr" "wizarrrr/wizarr"
msg_info "Updating $APP to v${RELEASE}"
cd /opt/wizarr
uv -q sync --locked
$STD uv -q run pybabel compile -d app/translations
$STD npm --prefix app/static install
@@ -64,8 +62,6 @@ function update_script() {
rm -rf "$BACKUP_FILE"
rm /tmp/"$RELEASE".zip
msg_ok "Cleanup Completed"
echo "${RELEASE}" >/opt/wizarr_version.txt
msg_ok "Update Successful"
else
msg_ok "No update required. ${APP} is already at v${RELEASE}"