1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/ghost_ynh.git synced 2024-09-03 19:16:02 +02:00

Download admin too in updater.sh

This commit is contained in:
tituspijean 2021-09-29 08:27:26 +02:00
parent 47fdc0197f
commit 59464536f0

View file

@ -20,6 +20,9 @@ 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)
assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
admin_repo="TryGhost/Admin"
assets+=("https://api.github.com/repos/TryGhost/Admin/zipball/$version")
# 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.
# You may need more tweaks here if the upstream repository has different naming conventions.
@ -67,6 +70,9 @@ case $asset_url in
*"Ghost-"*".zip")
src="app"
;;
*"/Admin/"*)
src="admin"
;;
*)
src=""
;;
@ -100,7 +106,6 @@ SOURCE_SUM=$checksum
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=$extension
SOURCE_IN_SUBDIR=false
SOURCE_FILENAME=
EOT
echo "... conf/$src.src updated"