Update on how to get the Vaultwarden version
This commit is contained in:
parent
eb4fe9de6d
commit
15ce3e0bee
@ -60,10 +60,10 @@ function update_vaultwarden {
|
||||
}
|
||||
|
||||
# retrieve local release
|
||||
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
|
||||
latest_release=$(git ls-remote https://github.com/dani-garcia/vaultwarden.git HEAD | awk '{print substr($1, 1, length($1) - 32)}')
|
||||
latest_release=$(/usr/bin/curl --silent "https://api.github.com/repos/dani-garcia/vaultwarden/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")')
|
||||
|
||||
# compare these two versions
|
||||
if [ ${latest_release} == ${local_release} ]
|
||||
|
Loading…
Reference in New Issue
Block a user