From f3ef55fc0381c22b878ccbeb5f49477a92cb414c Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Sun, 5 Nov 2023 20:28:29 +0000 Subject: [PATCH] Release script is now more flexible about release notes. --- tools/release.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tools/release.sh b/tools/release.sh index 0932b4d..48bb254 100755 --- a/tools/release.sh +++ b/tools/release.sh @@ -46,11 +46,6 @@ echo "Current version is $(project_version)." echo -n "Which version do you want to release? " read release_version -if ! grep "^## " release-notes.md | head -1 | grep --silent "^## $release_version$"; then - echo "You forgot to update the release notes." >&2 - exit 1 -fi - echo -n "Which will be the next version? " read next_version @@ -80,6 +75,13 @@ fi echo "done." +while ! grep "^## " release-notes.md | head -1 | grep --silent "^## $release_version$"; do + echo + echo "There's no entry for this version in the release notes." + echo -n "Go ahead and add them and press enter when you're done... " + read +done + set_version "$release_version" git commit -am "Release v${release_version}."