unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] Makefile.local: added checks for latest NEWS title
@ 2012-05-26 15:22 Tomi Ollila
  2012-05-26 15:22 ` [PATCH 2/2] Makefile.local: added verify-version-news to verify-no-dirty-code deps Tomi Ollila
  2012-05-26 17:17 ` [PATCH 1/2] Makefile.local: added checks for latest NEWS title David Bremner
  0 siblings, 2 replies; 3+ messages in thread
From: Tomi Ollila @ 2012-05-26 15:22 UTC (permalink / raw)
  To: notmuch; +Cc: Tomi Ollila

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-26 17:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-26 15:22 [PATCH 1/2] Makefile.local: added checks for latest NEWS title Tomi Ollila
2012-05-26 15:22 ` [PATCH 2/2] Makefile.local: added verify-version-news to verify-no-dirty-code deps Tomi Ollila
2012-05-26 17:17 ` [PATCH 1/2] Makefile.local: added checks for latest NEWS title David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).