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
+4 -7
View File
@@ -64,11 +64,9 @@ setup_alpine() {
$STD apk add --no-cache openssl apache2-utils
msg_ok "Installed Dependencies"
msg_info "Installing Tinyauth"
mkdir -p /opt/tinyauth
RELEASE=$(curl -s https://api.github.com/repos/tinyauthapp/tinyauth/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
curl -fsSL "https://github.com/tinyauthapp/tinyauth/releases/download/v${RELEASE}/tinyauth-$(arch_resolve)" -o /opt/tinyauth/tinyauth
chmod +x /opt/tinyauth/tinyauth
fetch_and_deploy_gh_release "tinyauth" "tinyauthapp/tinyauth" "singlefile" "latest" "/opt/tinyauth" "tinyauth-$(arch_resolve)"
msg_info "Configuring Tinyauth"
PASS=$(openssl rand -base64 8 | tr -dc 'a-zA-Z0-9' | head -c 8)
USER=$(htpasswd -Bbn "tinyauth" "${PASS}")
@@ -77,8 +75,7 @@ Tinyauth Credentials
Username: tinyauth
Password: ${PASS}
EOF
echo "${RELEASE}" >~/.tinyauth
msg_ok "Installed Tinyauth"
msg_ok "Configured Tinyauth"
read -r -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url