From: Mark Andrews Date: Wed, 23 May 2018 04:31:15 +0000 (+1000) Subject: ensure there is a blank line before a changes entry and a release marker X-Git-Tag: v9.9.13rc1~20^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=af973bfe8b53f9821dae90e22ce7525bbb3776cc;p=thirdparty%2Fbind9.git ensure there is a blank line before a changes entry and a release marker (cherry picked from commit c91770549f86f36f62dbbaef43e7a529ff9ae8aa) (cherry picked from commit d87eb5804dee423ccb3984462a6df4b78feb9ec1) --- diff --git a/util/check-changes b/util/check-changes index e401c0b2aef..be506aefefd 100644 --- a/util/check-changes +++ b/util/check-changes @@ -29,11 +29,11 @@ $\ = "\n"; # set output record separator $change = 0; $status = 0; +$wasblank = 1; line: while (<>) { ($Fld1,$Fld2,$Fld3,$Fld4) = split(' ', $_, 9999); - $change = 0 if (!$master && $Fld1 eq "---" && - $Fld3 eq "released" && $Fld4 eq "---"); + $change = 0 if (!$master && /^\s+--- .* ---$/); if ($Fld1 =~ /^[1-9][0-9]*\.$/ && $Fld2 =~ /^\[.*\]$/) { if ($change != 0 && $Fld1 >= $change) { print 'bad change number', $Fld1; @@ -44,6 +44,21 @@ line: while (<>) { $status = 1; } $change = $Fld1; + if (!$wasblank) { + print 'missing blank line before change', $Fld1; + $status = 1; + } + } + if (/^\s+--- .* ---$/) { + if (!$wasblank) { + print 'missing blank line before release marker for', $Fld2; + $status = 1; + } + } + if ($Fld1 eq "") { + $wasblank = 1; + } else { + $wasblank = 0; } }