Commit 4ff7c358 authored by anonym's avatar anonym
Browse files

Release process: improve error handling and robustness.

parent dce5ab30
......@@ -1210,12 +1210,16 @@ this release.
while read ticket; do
url="https://labs.riseup.net/code/issues/${ticket:?}"
url_content=$(curl --fail --silent ${url:?})
if [ "${?}" -ne 0 ]; then
if [ "${?}" -ne 0 ] || [ -z "${url_content:-}" ]; then
echo "Failed to fetch ${url:?} so manually investigate #${ticket:?}" >&2
continue
fi
ticket_status="$(echo "${url_content:?}" | \
sed -n 's,^.*<div class="status attribute"><div class="label">Status:</div><div class="value">\([^<>]\+\)</div></div>.*$,\1,p')"
if [ -z "${ticket_status:-}" ]; then
echo "Failed to find the status of #${ticket:?}" >&2
continue
fi
if [ "${ticket_status:?}" != "New" ] && \
[ "${ticket_status:?}" != "Confirmed" ] && \
[ "${ticket_status:?}" != "In Progress" ]; then
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment