[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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
145 changed files with 1041 additions and 1656 deletions

View file

@ -28,22 +28,17 @@ function update_script() {
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -fsSL https://api.github.com/repos/oauth2-proxy/oauth2-proxy/releases/latest | jq -r .tag_name | sed 's/^v//')
if [[ ! -f ~/.oauth2-proxy ]] || [[ "${RELEASE}" != "$(cat ~/.oauth2-proxy)" ]]; then
msg_info "Stopping ${APP} services"
if check_for_gh_release "oauth2-proxy" "oauth2-proxy/oauth2-proxy"; then
msg_info "Stopping Service"
systemctl stop oauth2-proxy
msg_ok "Stopped ${APP} service"
msg_ok "Stopped Service"
fetch_and_deploy_gh_release "oauth2-proxy" "oauth2-proxy/oauth2-proxy" "prebuild" "latest" "/opt/oauth2-proxy" "oauth2-proxy*linux-amd64.tar.gz"
msg_info "Starting ${APP} service"
msg_info "Starting Service"
systemctl start oauth2-proxy
msg_ok "Started ${APP} service"
msg_ok "Started Service"
msg_ok "Updated successfully!\n"
else
msg_ok "${APP} is already up to date (${RELEASE})"
fi
}