Skip to content

Commit

Permalink
Added build number to release file
Browse files Browse the repository at this point in the history
Added heap size to release file

Added IMPLEMENTOR to release file

Fixes: adoptium#889

Signed-off-by: Austin Bailey <Austin.Bailey@ibm.com>
  • Loading branch information
austin0 committed Sep 1, 2020
1 parent a62feca commit 9f32700
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,41 @@ fixJavaHomeUnderDocker() {
fi
}

addInfoToReleaseFile(){
# Extra information is added to the release file here
cd ${BUILD_CONFIG[JDK_PATH]}
addBuildNumber
addImplementor
# OpenJ9 specific options
if [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]; then
addHeapSize
fi
}

addBuildNumber(){
# If variable is populated add it to the release file
if [[ ${BUILD_CONFIG[OPENJDK_BUILD_NUMBER]} ]]; then
echo -e -n "\nBUILD_NUMBER=\"${BUILD_CONFIG[OPENJDK_BUILD_NUMBER]}\"" >> release
fi
}

addHeapSize(){
local jdkPath=${BUILD_CONFIG[JDK_PATH]}
if [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ]; then
if [ -d $jdkPath/jre/lib/amd64/compressedrefs ] || [ -d $jdkPath/lib/compressedrefs ]; then
echo -e -n "\HEAP_SIZE=\"Standard\"" >> release
else # Large heap has the folder /jre/lib/amd64/default or /lib/default
echo -e -n "\HEAP_SIZE=\"Large\"" >> release
fi
fi
}

addImplementor(){
if [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ]; then
echo -e -n "\nIMPLEMENTOR=\"AdoptOpenJDK\"" >> release
fi
}

################################################################################

loadConfigFromFile
Expand All @@ -847,6 +882,7 @@ buildTemplatedFile
executeTemplatedFile

printJavaVersionString
addInfoToReleaseFile

removingUnnecessaryFiles
copyFreeFontForMacOS
Expand Down

0 comments on commit 9f32700

Please sign in to comment.