Added target `verify-version-news` which checks that the first line in NEWS file has the following properties: First word is 'Notmuch' Second "word" matches the current version Rest of line is in format (201[2-9]-[01][0-9]-[0-3][0-9] --- Tested by executing the following commands: make verify-version-news make verify-version-news VERSION=0.13 make verify-version-news VERSION=0.12 Makefile.local | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/Makefile.local b/Makefile.local index 53b4a0d..1b34c00 100644 --- a/Makefile.local +++ b/Makefile.local @@ -220,6 +220,21 @@ verify-version-python: verify-version-components echo "Please edit version and $(PV_FILE) to have consistent versions." && false) @echo "Good." +.PHONY: verify-version-news +verify-version-news: verify-version-components + @read notmuch version date < NEWS ;\ + ev=0 ;\ + echo -n "Checking that this is 'Notmuch' NEWS..." ;\ + if [ "$$notmuch" = 'Notmuch' ]; then echo 'Good.' ;\ + else echo 'No.'; ev=1; fi ;\ + echo -n "Checking that NEWS version is $(VERSION)..." ;\ + if [ "$$version" = '$(VERSION)' ]; then echo 'Good.' ;\ + else echo 'No.'; ev=1; fi ;\ + echo -n "Checking that NEWS date is in correct format..." ;\ + case $$date in '('201[2-9]-[0-1][0-9]-[0-3][0-9]')') echo 'Good.' ;;\ + *) echo 'No.'; ev=1; esac ;\ + if [ $$ev -ne 0 ]; then echo "Please edit NEWS file to have Notmuch header line in correct format."; false; fi + .PHONY: verify-version-components verify-version-components: @echo -n "Checking that $(VERSION) consists only of digits and periods..." -- 1.7.1