Skip to content

Commit

Permalink
fix(build): fix changelog script with double digit versions
Browse files Browse the repository at this point in the history
Signed-off-by: Luca Guerra <luca@guerra.sh>
  • Loading branch information
LucaGuerra authored and poiana committed May 22, 2024
1 parent c9e9216 commit ed9790a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions build/changelog/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ func main() {
if len(from) == 0 {
match := []string{}
if len(plugin) > 0 {
match = append(match, "plugins/"+plugin+"/v[0-9].[0-9].[0-9]*")
match = append(match, plugin+"-[0-9].[0-9].[0-9]*")
match = append(match, "plugins/"+plugin+"/v[0-9]*.[0-9]*.[0-9]*")
match = append(match, plugin+"-[0-9]*.[0-9]*.[0-9]*")
}
tag, err := gitGetLatestTagWithMatch(match)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion changelog-gen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tool=./build/changelog/bin/changelog

to=""
from=""
tags="$(git tag -l | grep -e ${plugin}-[0-9].[0-9].[0-9] -e ${plugin}/v[0-9].[0-9].[0-9] | grep -v ${plugin}-[0-9].[0-9].[0-9]-rc | sort -r)"
tags="$(git tag -l | grep -E -e ${plugin}-[0-9]+.[0-9]+.[0-9]+ -e ${plugin}/v[0-9]+.[0-9]+.[0-9]+ | grep -E -v ${plugin}-[0-9]+.[0-9]+.[0-9]+-rc | sort -V -r)"

# print title
echo "# Changelog"
Expand Down

0 comments on commit ed9790a

Please sign in to comment.