Back to the old way of calculating the latest version of Vaultwarden

This commit is contained in:
adrien 2021-09-30 21:14:25 +02:00
parent 15ce3e0bee
commit d7febd3608
Signed by: adrien
GPG Key ID: 4F17BEA67707AC21

View File

@ -63,7 +63,7 @@ function update_vaultwarden {
local_release=$(/usr/local/bin/vaultwarden --version | awk --field-separator ' ' '{print $2}') local_release=$(/usr/local/bin/vaultwarden --version | awk --field-separator ' ' '{print $2}')
# retrieve the latest release # retrieve the latest release
latest_release=$(/usr/bin/curl --silent "https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")') latest_release=$(git ls-remote https://github.com/dani-garcia/vaultwarden.git HEAD | awk '{print substr($1, 1, length($1) - 32)}')
# compare these two versions # compare these two versions
if [ ${latest_release} == ${local_release} ] if [ ${latest_release} == ${local_release} ]