Skip to content

Commit e8cc9bc

Browse files
common: set proper version sorting in version.sh
numeric sort was not working properly with floating point numbers. 'make source' command, using this script was improperly called with some old "1.9.3+..." version: '1.9' in string search > '1.12'
1 parent 4e38a99 commit e8cc9bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

utils/version.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/usr/bin/env bash
22
# SPDX-License-Identifier: BSD-3-Clause
3-
# Copyright 2017-2020, Intel Corporation
3+
# Copyright 2017-2022, Intel Corporation
44
#
55
# utils/version.sh -- determine project's version
66
#
@@ -22,7 +22,7 @@ else
2222
PARSE_GIT_VERSION=0
2323
fi
2424

25-
LATEST_RELEASE=$(cat $1/ChangeLog | grep "* Version" | cut -d " " -f 3 | sort -rd | head -n1)
25+
LATEST_RELEASE=$(cat $1/ChangeLog | grep "* Version" | cut -d " " -f 3 | sort -rV | head -n1)
2626

2727
if [ $PARSE_GIT_VERSION -eq 1 ]; then
2828
GIT_VERSION_HASH=$(cat $1/GIT_VERSION)

0 commit comments

Comments
 (0)