Fix auto update

This commit is contained in:
Josué Tille 2024-08-01 00:30:49 +02:00
parent ebcff05cd8
commit fa25c055b3
No known key found for this signature in database
GPG key ID: 5F259226AD51F2F5

View file

@ -4,6 +4,8 @@ set -eu
readonly app_name=seafile readonly app_name=seafile
source auto_update_config.sh
get_from_manifest() { get_from_manifest() {
result=$(python3 <<EOL result=$(python3 <<EOL
import toml import toml
@ -24,7 +26,8 @@ check_app_version() {
local docker_digest_latest="$(echo "$docker_request_res" | local docker_digest_latest="$(echo "$docker_request_res" |
jq -r 'select(.name == "latest") | .digest')" jq -r 'select(.name == "latest") | .digest')"
local app_remote_version=$(echo "$docker_request_res" | local app_remote_version=$(echo "$docker_request_res" |
jq -r 'select(.digest == "'"$docker_digest_latest"'" and .name != "latest") | .name') jq -r 'select(.digest == "'"$docker_digest_latest"'" and .name != "latest") | .name' |
grep -E -v ".*-latest" | tail -n1)
## Check if new build is needed ## Check if new build is needed
if [[ "$app_version" != "$app_remote_version" ]] if [[ "$app_version" != "$app_remote_version" ]]