Skip to content

Commit

Permalink
Merge branch 'master' into feature/#1369-Ability-to-select-latest-sta…
Browse files Browse the repository at this point in the history
…ble-version-via-version-pattern
  • Loading branch information
hohwille authored Jan 8, 2024
2 parents d8100a2 + 9c13885 commit a547cd9
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .mvn/maven.config
Original file line number Diff line number Diff line change
@@ -1 +1 @@
-Drevision=2023.12.002-SNAPSHOT
-Drevision=2024.01.001-SNAPSHOT
6 changes: 6 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

This file documents all notable changes to https://github.com/devonfw/ide[devonfw-ide].

== 2024.01.001

Release with new features and bugfixes:

The full list of changes for this release can be found in https://github.com/devonfw/ide/milestone/50?closed=1[milestone 2024.01.001].

== 2023.12.001

Release with new features and bugfixes:
Expand Down
14 changes: 14 additions & 0 deletions scripts/src/main/resources/scripts/functions
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,20 @@ function doVersionCompare() {
then
local p1="${v1/[^0-9]*/}"
local p2="${v2/[^0-9]*/}"

# java versions may contain "_" indicating probably a build number
# let the major version be x and the build number y then the desired behaviour is x_y < x.0.1
if [ "${p1}" = "${p2}" ]
then
if [[ "${s1}" =~ "_" ]] && ! [[ "${s2}" =~ "_" ]]
then
return 2
fi
if [[ "${s2}" =~ "_" ]] && ! [[ "${s1}" =~ "_" ]]
then
return 1
fi
fi
local n1="${p1}"
local n2="${p2}"
if [ -z "${n1}" ]
Expand Down
5 changes: 5 additions & 0 deletions scripts/src/test/bash/test-version-compare
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,10 @@ doTestVersionCompare 3.0.0-beta17 '>' 3.0.0-beta11-SNAPSHOT
doTestVersionCompare 3.0.0.11 '>' 3.0.0-beta11-SNAPSHOT
doTestVersionCompare 2020.04.001 '>' 3.3.1
doTestVersionCompare "11*" '>' "11u0"
doTestVersionCompare 21.0.1_12 '>' 21_35
doTestVersionCompare 21_35 '<' 21.0.1_12
doTestVersionCompare 21_35 '<' 21
doTestVersionCompare 21_35 '<' 21_36
doTestVersionCompare 21_35 '<' 21_36.2

exit "${exitcode}"

0 comments on commit a547cd9

Please sign in to comment.