From 3f7f350aec32b61c1eccb561bce4e977e3d51f8b Mon Sep 17 00:00:00 2001 From: rudolfkoenig Date: Tue, 26 Dec 2023 14:11:26 +0000 Subject: [PATCH] pre-commit: add MAINTAINER.txt check (Forum #136270) git-svn-id: https://svn.fhem.de/fhem/trunk@28316 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/contrib/pre-commit | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/fhem/contrib/pre-commit b/fhem/contrib/pre-commit index 4c4899d01..6be6146c4 100755 --- a/fhem/contrib/pre-commit +++ b/fhem/contrib/pre-commit @@ -12,7 +12,7 @@ my $svnlook='/usr/bin/svnlook'; my $repos=$ARGV[0]; my $txn=$ARGV[1]; my $arg="-t $txn"; -#my $arg="-r $txn"; # local testing +#my $arg="-r $txn"; # local testing: perl pre-commit /var/svn/fhem 28315 my @lang = ("EN", "DE"); my $exitCode = 0; use constant TAGS => qw{ul li code b i u table tr td div h4 h3}; @@ -172,6 +172,17 @@ foreach my $row (split("\n", $fList)) { if($tagcount{$tag}); } } + + # Check if the file is in the MAINTAINER.txt, #136270 + open(MAINT, "$svnlook $arg cat $repos /trunk/fhem/MAINTAINER.txt|") || + die("Cant svnlook cat MAINTAINER.txt:$!\n"); + my $fnd = 0; + while(my $l = ) { + $fnd = 1 if($l =~ m,^FHEM/${modNum}_${modName}.pm,) + } + close(MAINT); + err $fName, "FHEM/${modNum}_${modName}.pm not found in MAINTAINER.txt" + if(!$fnd); } exit($exitCode);