Skip to content

Commit ea32daa

Browse files
committed
oops
1 parent 4e2afb9 commit ea32daa

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env perl
2+
3+
use English qw(-no_match_vars);
4+
use warnings;
5+
use strict;
6+
7+
open my $logfile, '<', 'CHANGELOG.md' or die "Cannot open 'CHANGELOG.md': $OS_ERROR\n";
8+
9+
local $RS = "## [";
10+
<$logfile>; # skip
11+
my $changes = <$logfile>;
12+
chomp($changes);
13+
14+
my $version = q{};
15+
if ( $changes =~ /^([\d.]+)\]/smx ) {
16+
$version = $1;
17+
$changes =~ s/^$version\]/\[v$version\]\[$version\]/smx;
18+
}
19+
20+
print STDOUT '## Release Notes for ', $changes, "\n";
21+
22+
local $RS = "\n";
23+
while ( my $line = <$logfile> ) {
24+
if ( $line =~ /^\[$version\]/smx ) {
25+
print STDOUT $line, "\n";
26+
last;
27+
}
28+
}

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
55

66
## [0.0.0] - 2025-09-19
77
### THIS IS A TEST
8+
## round 2
89

910

1011
## [1.1.2] - 2025-09-19

0 commit comments

Comments
 (0)