]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
ensure there is a blank line before a changes entry and a release marker
authorMark Andrews <marka@isc.org>
Wed, 23 May 2018 04:31:15 +0000 (14:31 +1000)
committerEvan Hunt <each@isc.org>
Thu, 24 May 2018 00:46:38 +0000 (20:46 -0400)
util/check-changes

index 4342c221619aaed3bae78e31e03703250a2d28e1..ee79da23b5c2ad3533672e596d5f887e134d2357 100644 (file)
@@ -24,11 +24,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;
@@ -39,6 +39,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;
     }
 }