fixup-CHANGES.md-postrelease.pl 719 B

12345678910111213141516171819202122232425262728
  1. #! /usr/bin/env perl -pi
  2. BEGIN {
  3. our $count = 1; # Only the first one
  4. our $RELEASE = $ENV{RELEASE};
  5. our $RELEASE_TEXT = $ENV{RELEASE_TEXT};
  6. our $PREV_RELEASE_DATE = $ENV{PREV_RELEASE_DATE} || 'xx XXX xxxx';
  7. our $PREV_RELEASE_TEXT = $ENV{PREV_RELEASE_TEXT};
  8. $RELEASE =~ s/-dev//;
  9. }
  10. if (/^### Changes between (\S+) and (\S+) \[xx XXX xxxx\]/
  11. && $count-- > 0) {
  12. my $v1 = $1;
  13. my $v2 = $PREV_RELEASE_TEXT || $2;
  14. # If this is a pre-release, we do nothing
  15. if ($RELEASE !~ /^\d+\.\d+\.\d+-(?:alpha|beta)/) {
  16. $_ = <<_____
  17. ### Changes between $v2 and $RELEASE_TEXT [xx XXX xxxx]
  18. * none yet
  19. ### Changes between $v1 and $v2 [$PREV_RELEASE_DATE]
  20. _____
  21. }
  22. }