Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 9a984aa
  • /
  • fixup-CHANGES.md-postrelease.pl
Raw File
Permalinks

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge Iframe embedding
swh:1:cnt:0fb2e9134f9be178f4d16f29403940634906cacd
directory badge Iframe embedding
swh:1:dir:9a984aad0ba8c5aa3e5b7a2da5b56c440f9c04ff
fixup-CHANGES.md-postrelease.pl
#! /usr/bin/env perl -pi

BEGIN {
    our $count = 1;              # Only the first one
    our $RELEASE = $ENV{RELEASE};
    our $RELEASE_TEXT = $ENV{RELEASE_TEXT};
    our $PREV_RELEASE_DATE = $ENV{PREV_RELEASE_DATE} || 'xx XXX xxxx';
    our $PREV_RELEASE_TEXT = $ENV{PREV_RELEASE_TEXT};

    $RELEASE =~ s/-dev//;
}

if (/^### Changes between (\S+) and (\S+) \[xx XXX xxxx\]/
    && $count-- > 0) {
    my $v1 = $1;
    my $v2 = $PREV_RELEASE_TEXT || $2;

    # If this is a pre-release, we do nothing
    if ($RELEASE !~ /^\d+\.\d+\.\d+-(?:alpha|beta)/) {
        $_ = <<_____
### Changes between $v2 and $RELEASE_TEXT [xx XXX xxxx]

 * 

### Changes between $v1 and $v2 [$PREV_RELEASE_DATE]
_____
    }
}

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top