diff options
author | Karen Etheridge <ether@cpan.org> | 2023-02-20 15:36:31 -0800 |
---|---|---|
committer | Karen Etheridge <ether@cpan.org> | 2023-02-20 15:53:23 -0800 |
commit | deb0331caf18430e66f6928b4203b5c96c83440a (patch) | |
tree | 6ec14f5964d5ec406261a58e577387aa1d6d7679 /Porting | |
parent | 8346452e433bda59983028249e267c21fe2cf1e8 (diff) | |
download | perl-deb0331caf18430e66f6928b4203b5c96c83440a.tar.gz |
when generating RMG, use real version numbers when possible
Diffstat (limited to 'Porting')
-rw-r--r-- | Porting/make-rmg-checklist | 11 | ||||
-rw-r--r-- | Porting/release_managers_guide.pod | 48 |
2 files changed, 35 insertions, 24 deletions
diff --git a/Porting/make-rmg-checklist b/Porting/make-rmg-checklist index 8b11ed02fc..699412e7c4 100644 --- a/Porting/make-rmg-checklist +++ b/Porting/make-rmg-checklist @@ -146,6 +146,13 @@ my ( @items, $current_element, @leading_attrs ); my $skip_headers = qr/^=encoding/xms; my $passthru_headers = qr/^= (?: over | item | back | cut )/xms; +# version used when generating diffs (acknowledgements, Module::CoreList etc) +# 5.36.0 -> 5.34.0 +# 5.36.1 -> 5.36.0 +my ($major, $minor, $point) = split(/\./, $version); +my $last_version = join('.', $major, ($point == 0 ? ($minor - 2, 0) : ($minor, $point-1))); + + foreach my $line (@pod_lines) { $line =~ $skip_headers and next; @@ -179,6 +186,10 @@ foreach my $line (@pod_lines) { or $line =~ /^[^=]/xms or die "Cannot recognize line: '$line'\n"; + $line =~ s/\Q5.X.Y\E/$version/g; + $line =~ s/\Q5.LAST\E/$last_version/g; + $line =~ s/\Q5.X\E-b/$major.$minor/g; + $current_element->{'content'} .= "\n" . $line; } diff --git a/Porting/release_managers_guide.pod b/Porting/release_managers_guide.pod index ed15b46073..61ba94dd7c 100644 --- a/Porting/release_managers_guide.pod +++ b/Porting/release_managers_guide.pod @@ -16,13 +16,13 @@ document that starts with a checklist for your release. This script is run as: perl Porting/make-rmg-checklist \ - --version [5.x.y-RC#] > /tmp/rmg.pod + --version [5.X.Y-RC#] > /tmp/rmg.pod You can also pass the C<--html> flag to generate an HTML document instead of POD. perl Porting/make-rmg-checklist --html \ - --version [5.x.y-RC#] > /tmp/rmg.html + --version [5.X.Y-RC#] > /tmp/rmg.html =head1 SYNOPSIS @@ -477,7 +477,7 @@ Commit your changes: $ git diff B<review the delta carefully> - $ git commit -a -m 'Bump the perl version in various places for 5.x.y' + $ git commit -a -m 'Bump the perl version in various places for 5.X.Y' At this point you may want to compare the commit with a previous bump to see if they look similar. See commit f7cf42bb69 for an example of a @@ -520,7 +520,7 @@ are committed first. Review the changes to the AUTHORS file, be sure you are not adding duplicate entries or removing any entries, then commit your changes. - $ git commit -a AUTHORS -m 'Update AUTHORS list for 5.x.y' + $ git commit -a AUTHORS -m 'Update AUTHORS list for 5.X.Y' =head3 Check copyright years @@ -591,7 +591,7 @@ need to freeze blead during the release. This is less important for BLEAD-FINAL, MAINT, and RC releases, since blead will already be frozen in those cases. Create the branch by running - git checkout -b release-5.xx.yy + git checkout -b release-5.X.Y =head3 build a clean perl @@ -611,7 +611,7 @@ For each Perl release since the previous release of the current branch, check for modules that have identical version numbers but different contents by running: - $ ./perl -Ilib Porting/cmpVERSION.pl --tag=v5.X.YY + $ ./perl -Ilib Porting/cmpVERSION.pl --tag=v5.X.Y (This is done automatically by F<t/porting/cmp_version.t> for the previous release of the current branch, but not for any releases from other branches.) @@ -726,7 +726,7 @@ Finally, commit the new version of Module::CoreList: (unless this is for MAINT; in which case commit it to blead first, then cherry-pick it back). - $ git commit -m 'Update Module::CoreList for 5.x.y' \ + $ git commit -m 'Update Module::CoreList for 5.X.Y' \ dist/Module-CoreList/Changes \ dist/Module-CoreList/lib/Module/CoreList.pm \ dist/Module-CoreList/lib/Module/CoreList/Utils.pm @@ -741,7 +741,7 @@ ensure all tests are passing. Finalize the perldelta. In particular, fill in the Acknowledgements section, which can be generated with something like: - $ perl Porting/acknowledgements.pl v5.15.0..HEAD + $ perl Porting/acknowledgements.pl v5.LAST..HEAD Fill in the "New/Updated Modules" sections now that Module::CoreList is updated: @@ -914,22 +914,22 @@ Be sure to commit any changes (if applicable): Build perl, then make sure it passes its own test suite, and installs: $ git clean -xdf - $ ./Configure -des -Dprefix=/tmp/perl-5.x.y-pretest + $ ./Configure -des -Dprefix=/tmp/perl-5.X.Y-pretest # or if it's an odd-numbered version: - $ ./Configure -des -Dusedevel -Dprefix=/tmp/perl-5.x.y-pretest + $ ./Configure -des -Dusedevel -Dprefix=/tmp/perl-5.X.Y-pretest $ make test install -Check that the output of C</tmp/perl-5.x.y-pretest/bin/perl -v> and -C</tmp/perl-5.x.y-pretest/bin/perl -V> are as expected, +Check that the output of C</tmp/perl-5.X.Y-pretest/bin/perl -v> and +C</tmp/perl-5.X.Y-pretest/bin/perl -V> are as expected, especially as regards version numbers, patch and/or RC levels, and @INC paths. Note that as they have been built from a git working directory, they will still identify themselves using git tags and commits. (Note that for an odd-numbered version, perl will install -itself as C<perl5.x.y>). C<perl -v> will identify itself as: +itself as C<perl5.X.Y>). C<perl -v> will identify itself as: - This is perl 5, version X, subversion Y (v5.X.Y (v5.X.Z-NNN-gdeadbeef)) + This is perl 5, version X, subversion Y (v5.X.Y (v5.XX.Z-NNN-gdeadbeef)) where 5.X.Z is the latest tag, NNN the number of commits since this tag, and C<< deadbeef >> commit of that tag. @@ -950,11 +950,11 @@ and you'll need to use a new version number for your release. Verify that your tag is annotated: - $ git show v5.11.0 + $ git show v5.X.Y The output must look similar to the following: - tag v5.11.0 + tag v5.X.Y Tagger: Jesse Vincent <jesse@bestpractical.com> Date: Fri Oct 2 16:29:56 2009 -0400 @@ -1061,7 +1061,7 @@ which is why you should test from the tarball. $ ./perl -Ilib ./utils/perlivp # Or, perhaps: - $ ./perl5.x.y ./utils/perlivp5.x.y + $ ./perl5.X.Y ./utils/perlivp5.X.Y ... All tests successful. $ @@ -1095,7 +1095,7 @@ Bootstrap the CPAN client on the clean install: $ bin/cpan # Or, perhaps: - $ bin/cpan5.xx.x + $ bin/cpan5.X.Y =head4 Install the Inline module with CPAN and test it @@ -1233,9 +1233,9 @@ Merge the (local) release branch back into master now, and delete it. git checkout blead git pull - git merge release-5.xx.yy + git merge release-5.X.Y git push - git branch -d release-5.xx.yy + git branch -d release-5.X.Y Note: The merge will create a merge commit if other changes have been pushed to blead while you've been working on your release branch. Do NOT rebase your @@ -1249,7 +1249,7 @@ Now that you've shipped the new perl release to PAUSE and pushed your changes to the Perl master repository, it's time to publish the tag you created earlier too (e.g.): - $ git push origin tag v5.11.0 + $ git push origin tag v5.X.Y =head3 update epigraphs.pod @@ -1427,8 +1427,8 @@ the commit tagged as the current release. Assuming you're using git 1.7.x or newer: - $ git checkout -b maint-5.12 v5.12.0 - $ git push origin -u maint-5.12 + $ git checkout -b maint-5.X v5.X.0 + $ git push origin -u maint-5.X =for checklist skip BLEAD-POINT MAINT RC @@ -1557,7 +1557,7 @@ about blead's current version. Commit and push your changes. $ git add -u - $ git commit -m "Prepare Module::Corelist for 5.XX.Y" + $ git commit -m "Prepare Module::Corelist for 5.X.Y" $ git push origin =back |