1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/vaultwarden_ynh.git synced 2024-09-03 18:26:31 +02:00

Update updater.sh

This commit is contained in:
yalh76 2022-05-28 17:01:00 +02:00
parent 3c5efc0a57
commit 7fea4cffa3

View file

@ -20,7 +20,7 @@ repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]
version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1)
webversion=$(curl --silent "https://api.github.com/repos/dani-garcia/bw_web_builds/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1) webversion=$(curl --silent "https://api.github.com/repos/dani-garcia/bw_web_builds/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1)
assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").tarball_url ] | join(" ") | @sh' | tr -d "'")) assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").tarball_url ] | join(" ") | @sh' | tr -d "'"))
assets+=($(curl --silent "https://api.github.com/repos/dani-garcia/bw_web_builds/releases" | jq -r '[ .[] | select(.tag_name=="'$webversion'").tarball_url ] | join(" ") | @sh' | tr -d "'")) assets+=($(curl --silent "https://api.github.com/repos/dani-garcia/bw_web_builds/releases" | jq -r '[ .[] | select(.tag_name=="'$webversion'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
# Later down the script, we assume the version has only digits and dots # Later down the script, we assume the version has only digits and dots
# Sometimes the release name starts with a "v", so let's filter it out. # Sometimes the release name starts with a "v", so let's filter it out.
@ -69,7 +69,7 @@ for asset_url in ${assets[@]}; do
*"vaultwarden"*) *"vaultwarden"*)
src="app" src="app"
;; ;;
*"bw_web_builds"*) *"bw_web_v"*".tar.gz")
src="web" src="web"
;; ;;
*) *)