bito-code-review[bot] commented on PR #15584:
URL: https://github.com/apache/grails-core/pull/15584#issuecomment-4274487380
<!-- Bito Reply -->
Yes, looping through all folders from `svn ls` and prompting for each would
be safer in a multi-branch environment, as it avoids assuming the first folder
is the correct one to delete. This prevents accidental removal of folders from
other branches.
**.github/scripts/releaseDistributions.sh**
```
for folder in $(svn ls "${svn_flags[@]}" "${RELEASE_ROOT}"); do
folder=$(echo "$folder" | sed 's|/$||')
PRIOR_RELEASE_URL="${RELEASE_ROOT}/${folder}"
read -r -p "Remove old release folder '${folder}' at ${PRIOR_RELEASE_URL}?
[y/N] " confirm
if [[ "${confirm}" =~ ^[Yy]$ ]]; then
echo "🗑️ Deleting old release folder: ${PRIOR_RELEASE_URL}"
svn rm "${svn_flags[@]}" -m "Remove previous release ${folder}"
"${PRIOR_RELEASE_URL}"
echo "✅ Deleted old release folder"
else
echo "⏭️ Skipping removal of old release folder: ${PRIOR_RELEASE_URL}"
fi
done
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]