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
+13 -10
View File
@@ -452,20 +452,23 @@ releaseAssets=(
"${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
if [[ ! -f "${releaseAsset}" ]]; then
printf "Error: the file %s does not exist.\n" "${releaseAsset}"
missingAsset=1
while [[ ${missingAsset} -ne 0 ]]; do
missingAsset=0
for releaseAsset in "${releaseAssets[@]}"; do
if [[ ! -f "${releaseAsset}" ]]; then
printf "Error: the file %s does not exist.\n" "${releaseAsset}"
missingAsset=1
fi
done
if [[ ${missingAsset} -ne 0 ]]; then
read -r -p "Some files are missing, please fix the issue and press enter to retry. Press Ctrl+C to exit. "
fi
done
if [[ ${missingAsset} -ne 0 ]]; then
printf "Fatal: some files are missing, cannot create the GitHub release.\n"
exit 1
fi
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}" \
--repo element-hq/element-x-android \