[feat]: migrate all update_scripts to new version helper (gh) (#7262)

* first migrations

* finalize

* add fix kometa inside function
This commit is contained in:
CanbiZ
2025-08-29 12:27:24 +02:00
committed by GitHub
parent 54b59e24ca
commit 9305a4ca85
145 changed files with 1041 additions and 1656 deletions

View File

@@ -28,26 +28,22 @@ function update_script() {
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/zitadel/zitadel/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f ~/.zitadel ]] || [[ "${RELEASE}" != "$(cat ~/.zitadel)" ]]; then
msg_info "Stopping $APP"
if check_for_gh_release "zitadel" "zitadel/zitadel"; then
msg_info "Stopping Service"
systemctl stop zitadel
msg_ok "Stopped $APP"
msg_ok "Stopped Service"
rm -f /usr/local/bin/zitadel
fetch_and_deploy_gh_release "zitadel" "zitadel/zitadel" "prebuild" "latest" "/usr/local/bin" "zitadel-linux-amd64.tar.gz"
msg_info "Updating $APP to ${RELEASE}"
msg_info "Updating $APP"
$STD zitadel setup --masterkeyFile /opt/zitadel/.masterkey --config /opt/zitadel/config.yaml --init-projections=true
msg_ok "Updated $APP to ${RELEASE}"
msg_ok "Updated $APP"
msg_info "Starting $APP"
msg_info "Starting Service"
systemctl start zitadel
msg_ok "Started $APP"
msg_ok "Started Service"
msg_ok "Update Successful"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}