update: add changes file entry check to mp-check

This commit is contained in:
ngn 2024-08-22 08:04:43 +03:00
parent 7b7b386dab
commit 9fc56f5dc8
3 changed files with 12 additions and 2 deletions

View File

@ -1,5 +1,5 @@
SUBDIRS := $(wildcard */.) SUBDIRS := $(wildcard */.)
VERSION = 24.06 VERSION = 24.07
install: install:
@for dir in $(SUBDIRS) ; do \ @for dir in $(SUBDIRS) ; do \

View File

@ -1,7 +1,7 @@
PREFIX = /usr PREFIX = /usr
install: install:
install -Dm755 "mp-check.sh" $(DESTDIR)/$(PREFIX)/bin/mp-check install -Dm755 "main.sh" $(DESTDIR)/$(PREFIX)/bin/mp-check
uninstall: uninstall:
rm $(DESTDIR)/$(PREFIX)/bin/mp-check rm $(DESTDIR)/$(PREFIX)/bin/mp-check

View File

@ -242,6 +242,10 @@ check_archive(){
add_warning "Changes file is empty" add_warning "Changes file is empty"
fi 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" info "Checking archive name"
archivefile="$(basename "${archivepath}")" archivefile="$(basename "${archivepath}")"
@ -312,6 +316,12 @@ check_source(){
if ! grep -q . "${sourcepath}/changes.md"; then if ! grep -q . "${sourcepath}/changes.md"; then
add_warning "Changes file is empty" add_warning "Changes file is empty"
fi 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
} }
################# #################