mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 21:32:34 +00:00
Allow retrying finding the release assets in release script (#7619)
This commit is contained in:
committed by
GitHub
parent
99fce78f76
commit
27e161605f
+13
-10
@@ -452,20 +452,23 @@ 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
|
||||||
if [[ ! -f "${releaseAsset}" ]]; then
|
missingAsset=0
|
||||||
printf "Error: the file %s does not exist.\n" "${releaseAsset}"
|
for releaseAsset in "${releaseAssets[@]}"; do
|
||||||
missingAsset=1
|
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
|
fi
|
||||||
done
|
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[@]}"
|
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}" \
|
||||||
--repo element-hq/element-x-android \
|
--repo element-hq/element-x-android \
|
||||||
|
|||||||
Reference in New Issue
Block a user