aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2022-01-05 16:13:59 +0530
committerArun Isaac2022-01-05 16:26:05 +0530
commit40e52ca6e3ee1cabe563e8ad2bda3b606ea86e70 (patch)
treebc9802aa12256fa6663fd6e134ea79d2de0d04f9
parent68679bb6cab3b4480fa4f1b89d7a87ac1ddb3c64 (diff)
downloadkolam-40e52ca6e3ee1cabe563e8ad2bda3b606ea86e70.tar.gz
kolam-40e52ca6e3ee1cabe563e8ad2bda3b606ea86e70.tar.lz
kolam-40e52ca6e3ee1cabe563e8ad2bda3b606ea86e70.zip
build-aux: Check news during distcheck.
* Makefile (distcheck): Pass version to distcheck script. * build-aux/distcheck.scm (check-news): New function. Check news.
-rw-r--r--Makefile2
-rw-r--r--build-aux/distcheck.scm14
2 files changed, 13 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 59bc559..b0106c8 100644
--- a/Makefile
+++ b/Makefile
@@ -58,7 +58,7 @@ $(dist_archive): .git/refs/heads/main
$(GPG) --detach-sign --armor $<
distcheck: $(dist_archive)
- $(GUILE) build-aux/distcheck.scm $<
+ $(GUILE) build-aux/distcheck.scm $(version) $<
install: $(sources) $(objects)
install -D $(sources) --target-directory $(scmdir)
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)))