Skip to content

Commit 7bb7385

Browse files
authored
fix(snyk-report): Sort analyzed released, add master (#23250)
Signed-off-by: Oliver Gondža <[email protected]>
1 parent eb794b7 commit 7bb7385

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hack/snyk-report.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,17 @@ function get_latest_minor_version_tags() {
88

99
git tag -l \
1010
| sed -E 's/(v[0-9]\.[0-9]+).*/\1/' \
11-
| sort -Vu \
12-
| tail -n "$count"
11+
| sort --version-sort --reverse --unique \
12+
| head -n "$count"
1313
}
1414

1515
function get_latest_patch_versions() {
1616
count=$1
1717

18+
echo "master"
1819
while read -r minor; do
19-
git tag -l | grep "^$minor" | sort -V | tail -n 1
20+
# For each minor release, find latest patch release tag
21+
git tag -l | grep "^$minor" | sort --version-sort | tail -n 1
2022
done < <(get_latest_minor_version_tags "$count")
2123
}
2224

0 commit comments

Comments
 (0)