Vault: Update command to get current version

This commit is contained in:
gardouille 2024-10-28 15:48:48 +01:00
parent 98d3f756de
commit 33825e2862
Signed by: gardouille
GPG Key ID: E759BAA22501AF32

View File

@ -54,7 +54,7 @@ else
vaultwarden_bin_path="/opt/vaultwarden/vaultwarden"
fi
vaultwarden_current_version=$("${vaultwarden_bin_path}" --version | sed 's/vaultwarden \(\([0-9]\{1,3\}\.\)\{2\}\([0-9]\{1,3\}\)\).*/\1/')
vaultwarden_current_version=$("${vaultwarden_bin_path}" --version | awk -F'[ -]' '/Vaultwarden/ { print $2 }')
vaultwarden_repo_url="https://github.com/dani-garcia/vaultwarden"
vaultwarden_new_version=$("${script_wd}"/releasetags "${vaultwarden_repo_url}" | grep -vE -- '(dev|rc)' | head -n1)