From 62241c3755807910885c5b06b476b3deb190e96a Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Mon, 31 Jul 2017 17:09:14 -0400 Subject: [PATCH] use edit-deliverable in script to set the release notes URLs Change-Id: Iff9aedb2faf888a5440e54b0a889140676e50f7b Signed-off-by: Doug Hellmann --- tools/add_release_note_links.sh | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/tools/add_release_note_links.sh b/tools/add_release_note_links.sh index 48c9194825..2182b582cf 100755 --- a/tools/add_release_note_links.sh +++ b/tools/add_release_note_links.sh @@ -24,6 +24,11 @@ fi SERIES="$1" +# Set up and activate the virtualenv that contains the +# edit-deliverable command. +tox -e venv --notest +source .tox/venv/bin/activate + function url_exists { local url="$1" @@ -42,17 +47,7 @@ for filename in deliverables/$SERIES/*.yaml; do if ! url_exists $url; then echo " no release notes page at $url" else - new_value="release-notes: $url" - if grep -q "$new_value" $filename; then - echo " OK" - else - # Remove any existing links, since they might point to the - # "unreleased" page. - sed -i -e '/release-notes/d' $filename - # Add the link pointing to the series-specific page. - sed -i -e "/team:.*/a \ -$new_value" $filename - echo " updated" - fi + echo + edit-deliverable $SERIES $deliverable --release-notes "$url" fi done