Allow retrying finding the release assets in release script (#7619)

This commit is contained in:
Jorge Martin Espinosa
2026-09-01 16:59:56 +02:00
committed by GitHub
parent 99fce78f76
commit 27e161605f
+10 -7
View File
@@ -452,19 +452,22 @@ releaseAssets=(
"${fdroidTargetPath}/app-fdroid-x86_64-release-signed.apk" "${fdroidTargetPath}/app-fdroid-x86_64-release-signed.apk"
) )
missingAsset=0 # Set this variable to something other than 0 to enter the loop, and reset it to 0 when all files are found.
missingAsset=-1
for releaseAsset in "${releaseAssets[@]}"; do while [[ ${missingAsset} -ne 0 ]]; do
missingAsset=0
for releaseAsset in "${releaseAssets[@]}"; do
if [[ ! -f "${releaseAsset}" ]]; then if [[ ! -f "${releaseAsset}" ]]; then
printf "Error: the file %s does not exist.\n" "${releaseAsset}" printf "Error: the file %s does not exist.\n" "${releaseAsset}"
missingAsset=1 missingAsset=1
fi fi
done done
if [[ ${missingAsset} -ne 0 ]]; then if [[ ${missingAsset} -ne 0 ]]; then
printf "Fatal: some files are missing, cannot create the GitHub release.\n" read -r -p "Some files are missing, please fix the issue and press enter to retry. Press Ctrl+C to exit. "
exit 1 fi
fi done
printf "Creating the pre-release v%s and uploading the %d files, this can take a while...\n" "${version}" "${#releaseAssets[@]}" printf "Creating the pre-release v%s and uploading the %d files, this can take a while...\n" "${version}" "${#releaseAssets[@]}"
gh release create "v${version}" \ gh release create "v${version}" \