Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests with modulesync 7.3.0; allow latest dependency versions #414

Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
support java version reported by openjdk 11 on centos-stream8
  • Loading branch information
h-haaks committed Feb 12, 2024
commit d076f72a08e4d9c5d48424dba9de4d206208d68e
26 changes: 12 additions & 14 deletions templates/check-java.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# This file is nearly identical to 'check-java.sh' in the Jira 8.15.0 standalone tarball. Shebang was changed to bash
# (does not need to stay /bin/sh, since it is called by catalina.sh, which itself has /bin/bash as shebang) to allow
# bashisms. Also errors detected by shellcheck were fixed .

# The file also fixes https://jira.atlassian.com/browse/JRASERVER-77097
#
# check for correct java version by parsing out put of java -version
# we expect first line to be in format 'java version "1.8.0_161"' or 'java version "10.0.1" 2018-04-17'
Expand All @@ -17,20 +17,18 @@ java_version=0

if [[ $java_raw_version = *-ea* ]]
then
# early access format e.g 11-ea
IFS='-' read -ra values <<< "$java_raw_version"
java_version=${values[0]}
# early access format e.g 11-ea or 11.0.18-ea
IFS='-' read -ra java_raw_version <<< "$java_raw_version"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The java-11-openjdk-headless package in centos-stream8 ( used in acceptance tests ) report java version 11.0.18-ea.
These changes are needed for the script to resolv the major version correctly.
This issue and solution has been posted to atlassian support as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fi
if [[ $java_raw_version = 1.* ]]
then
# old format e.g. 1.8.0_161
IFS='.' read -ra values <<< "$java_raw_version"
java_version=${values[1]}
else
if [[ $java_raw_version = 1.* ]]
then
# old format e.g. 1.8.0_161
IFS='.' read -ra values <<< "$java_raw_version"
java_version=${values[1]}
else
# new format e.g. 10.0.1
IFS='.' read -ra values <<< "$java_raw_version"
java_version=${values[0]}
fi
# new format e.g. 10.0.1
IFS='.' read -ra values <<< "$java_raw_version"
java_version=${values[0]}
fi

if [ "$java_version" -ne 8 ] && [ "$java_version" -ne 11 ]
Expand Down