From 4670f7885ebb5e23fd3c8d4746a62cdc6c73cc64 Mon Sep 17 00:00:00 2001 From: Steve Hancock Date: Fri, 31 May 2019 07:05:59 -0700 Subject: [PATCH] update MANIFEST for distribution --- MANIFEST | 4 ++++ MANIFEST.SKIP | 1 + dev-bin/build.pl | 37 +++++++++++++++++++++++++------------ lib/Perl/Tidy.pm | 28 ++++++++++++++-------------- 4 files changed, 44 insertions(+), 26 deletions(-) diff --git a/MANIFEST b/MANIFEST index edefe29f..78e9424a 100644 --- a/MANIFEST +++ b/MANIFEST @@ -12,6 +12,7 @@ docs/Tidy.html docs/tutorial.html examples/bbtidy.pl examples/break_long_quotes.pl +examples/delete_ending_blank_lines.pl examples/ex_mp.pl examples/filter_example.in examples/filter_example.pl @@ -57,6 +58,8 @@ t/snippets10.t t/snippets11.t t/snippets12.t t/snippets13.t +t/snippets14.t +t/snippets15.t t/snippets2.t t/snippets3.t t/snippets4.t @@ -65,6 +68,7 @@ t/snippets6.t t/snippets7.t t/snippets8.t t/snippets9.t +t/test-eol.t t/test.t t/testsa.t t/testss.t diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 7087383c..34c51be2 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -48,6 +48,7 @@ \#$ \b\.# \.bak$ +\.ba1$ \.tmp$ \.log$ \.archive$ diff --git a/dev-bin/build.pl b/dev-bin/build.pl index 2190f836..416a68f7 100755 --- a/dev-bin/build.pl +++ b/dev-bin/build.pl @@ -43,7 +43,7 @@ my $fh_log; # These are the main steps, in approximate order, for making a new version # Note: Since perl critic is in the .tidyallrc, a separate 'PC' step is not # needed -my $rsteps = [qw( CHK V PC TIDY T CL DOCS DIST)]; +my $rsteps = [qw( CHK V PC TIDY T CL DOCS MANIFEST DIST)]; my $rstatus = {}; foreach my $step ( @{$rsteps} ) { $rstatus->{$step} = 'TBD' } @@ -60,6 +60,7 @@ my $rcode = { 'TIDY' => \&run_tidyall, 'T' => \&make_tests, 'DOCS' => \&make_docs, + 'MANIFEST' => \&make_manifest, 'DIST' => \&make_dist, 'CL' => sub {openurl($changelog)}, 'LOG' => sub { openurl($logfile) }, @@ -77,17 +78,18 @@ sub main { Perltidy Build Main Menu - Case Insensitive ------------------------------------------- -A - run All Steps... -chk - view release CHecKlist status: $rstatus->{'CHK'} -v - check/update Version Number status: $rstatus->{'V'} -tidy - run tidyall (tidy & critic) status: $rstatus->{'TIDY'} -pc - run PerlCritic (critic only) status: $rstatus->{'PC'} -t - make Tests status: $rstatus->{'T'} -cl - review/edit CHANGES.md status: $rstatus->{'CL'} -docs - check and process POD & html status: $rstatus->{'DOCS'} -dist - make a Distribution tar.gz status: $rstatus->{'DIST'} -log - view Log file -html - view html files +A - run All Steps... +chk - view release CHecKlist status: $rstatus->{'CHK'} +v - check/update Version Number status: $rstatus->{'V'} +tidy - run tidyall (tidy & critic) status: $rstatus->{'TIDY'} +pc - run PerlCritic (critic only) status: $rstatus->{'PC'} +t - make Tests status: $rstatus->{'T'} +cl - review/edit CHANGES.md status: $rstatus->{'CL'} +manifest - make MANIFEST status: $rstatus->{'MANIFEST'} +docs - check and process POD & html status: $rstatus->{'DOCS'} +dist - make a Distribution tar.gz status: $rstatus->{'DIST'} +log - view Log file +html - view html files q,x - eXit @@ -236,6 +238,17 @@ sub make_docs { return; } +sub make_manifest { + + # FIXME: show differences between old and new manifest + my $result = sys_command("make manifest"); + print $result; + my $status = "OK"; + $rstatus->{'MANIFEST'} = $status; + hitcr(); + return; +} + sub make_dist { my $result; diff --git a/lib/Perl/Tidy.pm b/lib/Perl/Tidy.pm index 69f7f8c5..825b3570 100644 --- a/lib/Perl/Tidy.pm +++ b/lib/Perl/Tidy.pm @@ -1350,20 +1350,20 @@ EOM } } - # Make the output file for read + write unless we are in -b mode. - # Explanation: perltidy does not unlink existing output - # files before writing to them, for safety. If a designated - # output file exists and is not writable, perltidy will halt. - # This can prevent a data loss if a user - # accidentally enters "perltidy infile -o - # important_ro_file", or "perltidy infile -st - # >important_ro_file". But it also means that perltidy can - # get locked out of rerunning unless it marks its own - # output files writable. The alternative, of always - # unlinking the designated output - # file, is less safe and not always possible, except in -b - # mode, where there is an assumption that a previous backup - # can be unlinked even if not writable. + # Make the output file for rw unless we are in -b mode. + # Explanation: perltidy does not unlink existing output + # files before writing to them, for safety. If a + # designated output file exists and is not writable, + # perltidy will halt. This can prevent a data loss if a + # user accidentally enters "perltidy infile -o + # important_ro_file", or "perltidy infile -st + # >important_ro_file". But it also means that perltidy can + # get locked out of rerunning unless it marks its own + # output files writable. The alternative, of always + # unlinking the designated output file, is less safe and + # not always possible, except in -b mode, where there is an + # assumption that a previous backup can be unlinked even if + # not writable. if ( !$in_place_modify ) { $output_file_permissions |= oct(600); } -- 2.39.5