mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +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"
|
||||
)
|
||||
|
||||
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 \
|
||||
|
||||
Reference in New Issue
Block a user