From b16369f9e6f5af2c2cfbdb7d975d0367cdf39ce5 Mon Sep 17 00:00:00 2001 From: Horror Proton <107091537+horror-proton@users.noreply.github.com> Date: Thu, 9 Mar 2023 12:05:06 +0800 Subject: [PATCH] chore: skip ota build for empty pack --- tools/OTAPacker/build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/OTAPacker/build.sh b/tools/OTAPacker/build.sh index 5db472618b..a85ccdc42a 100755 --- a/tools/OTAPacker/build.sh +++ b/tools/OTAPacker/build.sh @@ -13,12 +13,15 @@ script_dir="$(dirname $(realpath "$0"))" latest_tag=$(head -n 1 "$releases_txt") while read tag; do + echo "::group::$tag" + if [ ! -d "$tag"/content ]; then mkdir -pv "$tag" cd "$tag" echo "Downloading $tag" gh release download "$tag" --repo $source_repo --pattern "MAA-$tag-win-$arch.zip" --clobber \ - || gh release download "$tag" --repo $source_repo_fallback --pattern "MAA-$tag-win-$arch.zip" --clobber + || gh release download "$tag" --repo $source_repo_fallback --pattern "MAA-$tag-win-$arch.zip" --clobber \ + || { echo "::warning:: win $arch not found in release $tag skipping."; echo "::endgroup::"; continue; } mkdir -pv 'content' unzip -q -O GB2312 -o "*.zip" -d 'content' rm -fv *.zip @@ -40,5 +43,7 @@ while read tag; do zip -q -9 -r "$working_dir"/"MAAComponent-OTA-${tag}_${latest_tag}-win-$arch.zip" . cd $working_dir fi + + echo "::endgroup::" done < "$releases_txt"