Skip to content

Commit 9bfd0ba

Browse files
committed
chore: fix get git tag in generate_release_notes.pl script
1 parent bc7ca58 commit 9bfd0ba

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

scripts/generate_release_notes.pl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,14 @@
1212
}
1313
}
1414

15-
my $features=`git log \$(git tag | tail -n2 | head -n1)..HEAD --no-merges --oneline | grep -Eo "feat:.*" | uniq`;
16-
my $fixes=`git log \$(git tag | tail -n2 | head -n1)..HEAD --no-merges --oneline | grep -Eo "fix:.*" | uniq`;
17-
my $other=`git log \$(git tag | tail -n2 | head -n1)..HEAD --no-merges --oneline | grep -Eo "other:.*" | uniq`;
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`;
1818

1919
if ($latest) {
20-
$features=`git log \$(git tag | tail -n1)..HEAD --no-merges --oneline | grep -Eo "feat:.*" | uniq`;
21-
$fixes=`git log \$(git tag | tail -n1)..HEAD --no-merges --oneline | grep -Eo "fix:.*" | uniq`;
22-
$other=`git log \$(git tag | tail -n1)..HEAD --no-merges --oneline | grep -Eo "other:.*" | 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`;
2323
}
2424

2525
my $hasFeatures=`printf "$features" | wc -l | tr -d '\n'`;
@@ -45,7 +45,7 @@ sub generate {
4545

4646
for my $msg (@list) {
4747
my $issue = `echo "$msg" | grep -Eo "#.*" | tr -d '\n'`;
48-
$msg =~ s/^(feat|other|fix): //gi;
48+
$msg =~ s/^(feat|other|fix|chore|impr): //gi;
4949

5050
if ($issue ne "") {
5151
my $issueId = substr $issue, 1;

0 commit comments

Comments
 (0)