From: Steve Hancock Date: Wed, 1 Jan 2025 16:39:31 +0000 (-0800) Subject: improve display of any MANIFEST changes X-Git-Tag: 20250105~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=cb295f5b8bf8e9dad65be9edd1bd8c9c3872618f;p=perltidy.git improve display of any MANIFEST changes --- diff --git a/dev-bin/build.pl b/dev-bin/build.pl index 312c3b9d..51baead0 100755 --- a/dev-bin/build.pl +++ b/dev-bin/build.pl @@ -315,11 +315,20 @@ sub make_docs { sub make_manifest { - my $fout = "tmp/manifest.out"; - my $result_uu = sys_command("make manifest >$fout 2>$fout"); - my $status = "OK"; - $rstatus->{'MANIFEST'} = $status; + my $fout = "tmp/manifest.out"; + my $fdiff = "tmp/manifest.diff"; + my $result = sys_command("make manifest >$fout 2>$fout"); post_result($fout); + $result = sys_command("diff MANIFEST.bak MANIFEST >$fdiff"); + if ( !$result ) { + query("No changes to MANIFEST; hit \n"); + } + else { + post_result($fdiff); + query("MANIFEST has changed, please check; hit \n"); + } + my $status = "OK"; + $rstatus->{'MANIFEST'} = $status; return; } ## end sub make_manifest @@ -697,7 +706,7 @@ sub update_copyright_date { $string =~ s/2000-(\d\d\d\d) by Steve Hancock/2000-$reported_year by Steve Hancock/g; if ( $string ne $old_string ) { - my $diff_msg = compare_string_buffers( \$old_string, \$string ); + my $diff_msg = compare_string_buffers( $old_string, $string, 3 ); print <$count:$lineo $line_diff EOM - return $msg; + $diff_count++; + last if ( $diff_count >= $max_diff_count ); } ## end while ( @aryi && @aryo ) + if ($diff_count) { return $msg } + #------------------------------------------------------ # no differences found, see if one file has fewer lines #------------------------------------------------------