6 for my $param (@ARGV) {
7 if ($param eq "--html") {
10 if ($param eq "--latest") {
15 my $features=`git log \$(git tag --sort=version:refname | tail -n2 | head -n1)..HEAD --no-merges --oneline | grep -Eo "feat:.*" | uniq`;
16 my $fixes=`git log \$(git tag --sort=version:refname | tail -n2 | head -n1)..HEAD --no-merges --oneline | grep -Eo "fix:.*" | uniq`;
17 my $other=`git log \$(git tag --sort=version:refname | tail -n2 | head -n1)..HEAD --no-merges --oneline | grep -Eo "(other|chore|impr):.*" | uniq`;
20 $features=`git log \$(git tag --sort=version:refname | tail -n1)..HEAD --no-merges --oneline | grep -Eo "feat:.*" | uniq`;
21 $fixes=`git log \$(git tag --sort=version:refname | tail -n1)..HEAD --no-merges --oneline | grep -Eo "fix:.*" | uniq`;
22 $other=`git log \$(git tag --sort=version:refname | tail -n1)..HEAD --no-merges --oneline | grep -Eo "(other|chore|impr):.*" | uniq`;
25 my $hasFeatures=`printf "$features" | wc -l | tr -d '\n'`;
26 my $hasFixes=`printf "$fixes" | wc -l | tr -d '\n'`;
27 my $hasOther=`printf "$other" | wc -l | tr -d '\n'`;
28 my @featureList = split /\n/, $features;
29 my @fixList = split /\n/, $fixes;
30 my @otherList = split /\n/, $other;
31 my $baseUrl = "https://github.com/Figma-Linux/figma-linux/issues";
32 my $release_note_file_path = "./release_notes";
34 `echo '' > $release_note_file_path`;
40 `echo "$title" >> $release_note_file_path`;
43 my $issue = `echo "$msg" | grep -Eo "#.*" | tr -d '\n'`;
44 $msg =~ s/^(feat|other|fix|chore|impr): //gi;
47 my $issueId = substr $issue, 1;
48 $msg =~ s/ ?(Close|#).*$//gi;
51 `echo '<li>$msg <a href="$baseUrl/$issueId" target="_blank">$issue</a></li>' >> $release_note_file_path`;
53 `echo "* $msg [$issue]($baseUrl/$issueId)" >> $release_note_file_path`;
57 `echo "<li>$msg</li>" >> $release_note_file_path`;
59 `echo "* $msg" >> $release_note_file_path`;
65 `echo "<li></li>" >> $release_note_file_path`;
69 if ($hasFeatures > 0) {
71 generate
("<li>Features:</li>", \
@featureList);
73 generate
("## Features:", \
@featureList);
77 `echo '' >> $release_note_file_path`;
83 generate
("<li>Bug Fixes:</li>", \
@fixList);
85 generate
("## Bug Fixes:", \
@fixList);
89 `echo '' >> $release_note_file_path`;
95 generate
("<li>Other Changes:</li>", \
@otherList);
97 generate
("## Other Changes:", \
@otherList);