From 55294e8fb60ada344ae0ba5c542e5e2d74d40dda Mon Sep 17 00:00:00 2001 From: tituspijean Date: Wed, 29 Sep 2021 08:27:26 +0200 Subject: [PATCH] Download admin too in updater.sh --- .github/workflows/updater.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/updater.sh b/.github/workflows/updater.sh index 10b7b53..e6951e8 100644 --- a/.github/workflows/updater.sh +++ b/.github/workflows/updater.sh @@ -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) 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. +# You may need more tweaks here if the upstream repository has different naming conventions. if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then version=${version:1} fi @@ -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"