Skip to content

Commit 63b440a

Browse files
authored
Use of version_lt function instead of less than (eclipse-che#5141)
less_than is not working with for example “5.9.1” and “5.10.0”, 5.9.0 being said to be a greater version bash-4.3# version_lt "5.9.0" "5.10.1" —> 0 bash-4.3# less_than "5.9.0" "5.10.1" —> 1 bash-4.3# less_than "5.6" "5.8" —> 0 Change-Id: I33417f012c193416bfb746df125c19e92a868b4e note: version_lt is a less and equals method, so we need to exclude the condition : tag == base version Signed-off-by: Florent BENOIT <fbenoit@codenvy.com>
1 parent 062e0b7 commit 63b440a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dockerfiles/base/scripts/base/startup_04_pre_cli_init.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ compare_versions() {
287287
TAG=$(echo $VERSION_LIST_JSON | jq ".results[$COUNTER].name")
288288
TAG=${TAG//\"}
289289

290-
if [ "$TAG" != "nightly" ] && [ "$TAG" != "latest" ]; then
291-
if less_than $BASE_VERSION $TAG; then
290+
if [ "$TAG" != "nightly" ] && [ "$TAG" != "latest" ] && [ "$TAG" != "${BASE_VERSION}" ]; then
291+
if version_lt $BASE_VERSION $TAG; then
292292
RETURN_VERSION=$TAG
293293
break;
294294
fi

0 commit comments

Comments
 (0)