From db0bd15b3bdcf4b287554bf261e0d56463803e2b Mon Sep 17 00:00:00 2001 From: Jonah Calvo Date: Fri, 18 Jun 2021 11:13:38 -0500 Subject: [PATCH 1/2] Updated java version check to fix dependency error --- release/archives/linux/data-prepper-tar-install-x64.sh | 2 +- release/archives/macos/data-prepper-tar-install-x64.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/archives/linux/data-prepper-tar-install-x64.sh b/release/archives/linux/data-prepper-tar-install-x64.sh index 751670c20..87851bc31 100755 --- a/release/archives/linux/data-prepper-tar-install-x64.sh +++ b/release/archives/linux/data-prepper-tar-install-x64.sh @@ -47,7 +47,7 @@ fi if [[ "$_java" ]] then java_type=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $1}') - java_version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed 's/\(.*\..*\)\..*/\1/g') + java_version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed '/^1\./s///' | cut -d'.' -f1) echo "Found $java_type of $java_version" if [[ $java_type == *"openjdk"* ]] then diff --git a/release/archives/macos/data-prepper-tar-install-x64.sh b/release/archives/macos/data-prepper-tar-install-x64.sh index 3c610c2aa..7d1acb2cf 100755 --- a/release/archives/macos/data-prepper-tar-install-x64.sh +++ b/release/archives/macos/data-prepper-tar-install-x64.sh @@ -47,7 +47,7 @@ fi if [[ "$_java" ]] then java_type=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $1}') - java_version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed 's/\(.*\..*\)\..*/\1/g') + java_version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}' | sed '/^1\./s///' | cut -d'.' -f1) echo "Found $java_type of $java_version" if [[ $java_type == *"openjdk"* ]] then From 7508382717519811c5d6629922bf1291f014df4b Mon Sep 17 00:00:00 2001 From: Jonah Calvo Date: Fri, 18 Jun 2021 11:25:00 -0500 Subject: [PATCH 2/2] Changed required version number to correspond with new regex --- release/archives/linux/data-prepper-tar-install-x64.sh | 2 +- release/archives/macos/data-prepper-tar-install-x64.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/release/archives/linux/data-prepper-tar-install-x64.sh b/release/archives/linux/data-prepper-tar-install-x64.sh index 87851bc31..ba30b091d 100755 --- a/release/archives/linux/data-prepper-tar-install-x64.sh +++ b/release/archives/linux/data-prepper-tar-install-x64.sh @@ -23,7 +23,7 @@ fi PIPELINES_FILE_LOCATION=$1 CONFIG_FILE_LOCATION=$2 -MIN_REQ_JAVA_VERSION=1.8 +MIN_REQ_JAVA_VERSION=8 MIN_REQ_OPENJDK_VERSION=8 DATA_PREPPER_HOME=$(dirname $(realpath $0)) EXECUTABLE_JAR=$(ls -1 $DATA_PREPPER_HOME/bin/*.jar 2>/dev/null) diff --git a/release/archives/macos/data-prepper-tar-install-x64.sh b/release/archives/macos/data-prepper-tar-install-x64.sh index 7d1acb2cf..21c5d7e49 100755 --- a/release/archives/macos/data-prepper-tar-install-x64.sh +++ b/release/archives/macos/data-prepper-tar-install-x64.sh @@ -24,7 +24,7 @@ fi PIPELINES_FILE_LOCATION=$1 CONFIG_FILE_LOCATION=$2 -MIN_REQ_JAVA_VERSION=1.8 +MIN_REQ_JAVA_VERSION=8 MIN_REQ_OPENJDK_VERSION=8 DATA_PREPPER_HOME=$(cd "$(dirname "$0")"; pwd) EXECUTABLE_JAR=$(ls -1 $DATA_PREPPER_HOME/bin/*.jar 2>/dev/null)