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:
parent
026476b0a8
commit
55294e8fb6
1 changed files with 7 additions and 2 deletions
9
.github/workflows/updater.sh
vendored
9
.github/workflows/updater.sh
vendored
|
@ -20,9 +20,12 @@ 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)
|
||||||
assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
|
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
|
# 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.
|
||||||
# You may need more tweaks here if the upstream repository has different naming conventions.
|
# You may need more tweaks here if the upstream repository has different naming conventions.
|
||||||
if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
|
if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
|
||||||
version=${version:1}
|
version=${version:1}
|
||||||
fi
|
fi
|
||||||
|
@ -67,6 +70,9 @@ case $asset_url in
|
||||||
*"Ghost-"*".zip")
|
*"Ghost-"*".zip")
|
||||||
src="app"
|
src="app"
|
||||||
;;
|
;;
|
||||||
|
*"/Admin/"*)
|
||||||
|
src="admin"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
src=""
|
src=""
|
||||||
;;
|
;;
|
||||||
|
@ -100,7 +106,6 @@ SOURCE_SUM=$checksum
|
||||||
SOURCE_SUM_PRG=sha256sum
|
SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=$extension
|
SOURCE_FORMAT=$extension
|
||||||
SOURCE_IN_SUBDIR=false
|
SOURCE_IN_SUBDIR=false
|
||||||
SOURCE_FILENAME=
|
|
||||||
EOT
|
EOT
|
||||||
echo "... conf/$src.src updated"
|
echo "... conf/$src.src updated"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue