Skip to content

Commit

Permalink
CI: parse java -version only
Browse files Browse the repository at this point in the history
  • Loading branch information
vhotspur committed Jul 22, 2021
1 parent 1e1c63e commit 84d7091
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tools/ci/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ RENAISSANCE_GIT_VERSION=$(git describe --tags --always --dirty=-SNAPSHOT || echo
# Strip leading 'v' from the git-produced version
RENAISSANCE_VERSION=${RENAISSANCE_GIT_VERSION#v}

# Try to guess JVM version
RENAISSANCE_JVM_MAJOR_VERSION="$( java -XshowSettings:properties -version 2>&1 \
| sed -n -e 's#^[ \t]*java.version[ ]*=[ ]\(.*\)#\1#p' \
| sed -e 's#1\.8#8#' -e 's#\([^.]*\).*#\1#' \
# Try to guess JVM version (and replace 1.8 with 8)
RENAISSANCE_JVM_MAJOR_VERSION="$( java -version 2>&1 \
| sed -n -e '/version[[:blank:]]\+"/ { s/.*version[[:blank:]]\+"\([^"]*\)".*/\1/; s/1[.]8/8/; s/^\([^.]*\)[.].*/\1/; p }' \
|| echo 8 )"

# The base bundle
Expand Down

0 comments on commit 84d7091

Please sign in to comment.