several scripts: use the release helpers instead of hand-rolled version checks and downloads (#17625)

* Use the release helpers instead of hand-rolled version checks and downloads

Legacy /opt/*_version.txt files move to ~/.<app> on the next update.

* homeassistant: use get_latest_github_release
This commit is contained in:
CanbiZ (MickLesk)
2026-10-02 08:01:49 +02:00
committed by GitHub
parent 94cdc531ca
commit b4bf7aacf3
29 changed files with 125 additions and 261 deletions
+1 -4
View File
@@ -65,10 +65,7 @@ setup_alpine() {
$STD rc-update add docker default
msg_ok "Installed Docker"
get_latest_release() {
curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4
}
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_release "docker/compose")
DOCKER_COMPOSE_LATEST_VERSION=$(get_latest_github_release "docker/compose" false)
read -r -p "${TAB3}Would you like to add Docker Compose? <y/N> " prompt
if [[ "${prompt,,}" =~ ^(y|yes)$ ]]; then
msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"