From 40e52ca6e3ee1cabe563e8ad2bda3b606ea86e70 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 5 Jan 2022 16:13:59 +0530 Subject: build-aux: Check news during distcheck. * Makefile (distcheck): Pass version to distcheck script. * build-aux/distcheck.scm (check-news): New function. Check news. --- build-aux/distcheck.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'build-aux') diff --git a/build-aux/distcheck.scm b/build-aux/distcheck.scm index 83e3db3..0316170 100644 --- a/build-aux/distcheck.scm +++ b/build-aux/distcheck.scm @@ -62,6 +62,16 @@ arguments." (inherit (package-in-archive dist-archive)) (source (local-file dist-archive)))))) +(define (check-news version dist-archive) + "Check if VERSION appears in the first 200 characters of the news +file in DIST-ARCHIVE." + (call-with-archive-file dist-archive "NEWS.org" + (lambda (port) + (unless (string-contains (get-string-n port 200) + version) + (error "NEWS.org does not mention current version:" version))))) + (match (program-arguments) - ((_ dist-archive) - (check-build dist-archive))) + ((_ version dist-archive) + (check-build dist-archive) + (check-news version dist-archive))) -- cgit v1.2.3