make add_release_notes_links.sh smarter

When everything is fine, say so.

When the project doesn't publish any release notes at all, don't
report that the series page is missing.

Change-Id: I122675d63c45a643af74a62ee42de1977ddc9ea6
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2018-02-28 11:43:48 -05:00
parent 4e040b6774
commit d1ed742726

View File

@ -42,12 +42,18 @@ function url_exists {
for filename in deliverables/$SERIES/*.yaml; do
deliverable=$(basename $filename .yaml)
echo -n $deliverable
url="https://docs.openstack.org/releasenotes/${deliverable}/${SERIES}.html"
if ! url_exists $url; then
echo " no release notes page at $url"
echo -n "$deliverable "
base="https://docs.openstack.org/releasenotes/${deliverable}"
main_url="${base}/index.html"
if ! url_exists $main_url; then
echo "no notes at all, skipping"
continue
fi
series_url="${base}/${SERIES}.html"
if ! url_exists $series_url; then
echo "no release notes page at $series_url"
else
echo
edit-deliverable $SERIES $deliverable set-release-notes "$url"
echo "OK"
edit-deliverable $SERIES $deliverable set-release-notes "$series_url"
fi
done