From 9fc56f5dc8f4b59c37d692bf8eb6b7bbf64780d8 Mon Sep 17 00:00:00 2001 From: ngn Date: Thu, 22 Aug 2024 08:04:43 +0300 Subject: [PATCH] update: add changes file entry check to mp-check --- Makefile | 2 +- mp-check/Makefile | 2 +- mp-check/{mp-check.sh => main.sh} | 10 ++++++++++ 3 files changed, 12 insertions(+), 2 deletions(-) rename mp-check/{mp-check.sh => main.sh} (96%) diff --git a/Makefile b/Makefile index a0fa8de..ed45e48 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ SUBDIRS := $(wildcard */.) -VERSION = 24.06 +VERSION = 24.07 install: @for dir in $(SUBDIRS) ; do \ diff --git a/mp-check/Makefile b/mp-check/Makefile index e9b6186..2e90b8c 100644 --- a/mp-check/Makefile +++ b/mp-check/Makefile @@ -1,7 +1,7 @@ PREFIX = /usr install: - install -Dm755 "mp-check.sh" $(DESTDIR)/$(PREFIX)/bin/mp-check + install -Dm755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/mp-check uninstall: rm $(DESTDIR)/$(PREFIX)/bin/mp-check diff --git a/mp-check/mp-check.sh b/mp-check/main.sh similarity index 96% rename from mp-check/mp-check.sh rename to mp-check/main.sh index 4935044..219ae0d 100755 --- a/mp-check/mp-check.sh +++ b/mp-check/main.sh @@ -242,6 +242,10 @@ check_archive(){ add_warning "Changes file is empty" fi + if ! grep "${version}" "${tmpdir}/CHANGES" &> /dev/null; then + add_warning "Changes potentially does not have an entry for the current version" + fi + info "Checking archive name" archivefile="$(basename "${archivepath}")" @@ -312,6 +316,12 @@ check_source(){ if ! grep -q . "${sourcepath}/changes.md"; then add_warning "Changes file is empty" fi + + if ! grep "${VERSION}" "${sourcepath}/changes.md" &> /dev/null; then + add_warning "Changes potentially does not have an entry for the current version" + fi + + clean_pkg_vars } #################