Skip to content

Commit

Permalink
Refactor vendor configure arguments (#2073)
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Bailey <Austin.Bailey@ibm.com>
  • Loading branch information
austin0 authored Sep 24, 2020
1 parent 6005401 commit 0636821
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 deletions.
37 changes: 14 additions & 23 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,22 @@ configuringVersionStringParameter()

local dateSuffix=$(date -u +%Y%m%d%H%M)

# Configures "vendor" jdk properties
if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_DRAGONWELL}" ]]; then
BUILD_CONFIG[VENDOR]="Alibaba"
else
BUILD_CONFIG[VENDOR]="AdoptOpenJDK"
BUILD_CONFIG[VENDOR_VERSION]="\"(Alibaba Dragonwell)\""
BUILD_CONFIG[VENDOR_URL]="http://www.alibabagroup.com"
BUILD_CONFIG[VENDOR_BUG_URL]="mailto:dragonwell_use@googlegroups.com"
elif [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]]; then
BUILD_CONFIG[VENDOR_VM_BUG_URL]="https://github.com/eclipse/openj9/issues"
fi

addConfigureArg "--with-vendor-name=" "${BUILD_CONFIG[VENDOR]:-"AdoptOpenJDK"}"
addConfigureArg "--with-vendor-url=" "${BUILD_CONFIG[VENDOR_URL]:-"https://adoptopenjdk.net/"}"
addConfigureArg "--with-vendor-bug-url=" "${BUILD_CONFIG[VENDOR_BUG_URL]:-"https://github.com/AdoptOpenJDK/openjdk-support/issues"}"
addConfigureArg "--with-vendor-vm-bug-url=" "${BUILD_CONFIG[VENDOR_VM_BUG_URL]:-"https://github.com/AdoptOpenJDK/openjdk-support/issues"}"
if [ "${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" -gt 8 ]; then
addConfigureArg "--with-vendor-version-string=" "${BUILD_CONFIG[VENDOR_VERSION]:-"${BUILD_CONFIG[BUILD_VARIANT]^}"}"
fi

if [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ]; then
Expand All @@ -199,9 +211,6 @@ configuringVersionStringParameter()
addConfigureArg "--enable-jfr" ""
fi

if [ ${BUILD_CONFIG[ADOPT_PATCHES]} == true ]; then
addConfigureArg "--with-vendor-name=" "AdoptOpenJDK"
fi
fi

# Set the update version (e.g. 131), this gets passed in from the calling script
Expand Down Expand Up @@ -252,24 +261,6 @@ configuringVersionStringParameter()

addConfigureArg "--without-version-pre" ""
addConfigureArgIfValueIsNotEmpty "--with-version-build=" "${buildNumber}"

if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_DRAGONWELL}" ]]; then
addConfigureArg "--with-vendor-name=" "${BUILD_CONFIG[VENDOR]}"
addConfigureArg "--with-vendor-version-string=" "\"(Alibaba Dragonwell)\""
addConfigureArg "--with-vendor-url=" "http://www.alibabagroup.com"
addConfigureArg "--with-vendor-bug-url=" "mailto:dragonwell_use@googlegroups.com"
else # ${BUILD_CONFIG[VENDOR]} defaults to AdoptOpenJDK
addConfigureArg "--with-vendor-name=" "${BUILD_CONFIG[VENDOR]}"
addConfigureArg "--with-vendor-version-string=" "AdoptOpenJDK"
addConfigureArg "--with-vendor-url=" "https://adoptopenjdk.net/"
addConfigureArg "--with-vendor-bug-url=" "https://github.com/AdoptOpenJDK/openjdk-support/issues"
fi

if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]]; then
addConfigureArg "--with-vendor-vm-bug-url=" "https://github.com/eclipse/openj9/issues"
else
addConfigureArg "--with-vendor-vm-bug-url=" "https://github.com/AdoptOpenJDK/openjdk-support/issues"
fi
fi
echo "Completed configuring the version string parameter, config args are now: ${CONFIGURE_ARGS}"
}
Expand Down
4 changes: 4 additions & 0 deletions sbin/common/config_init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ USE_SSH
USER_SUPPLIED_CONFIGURE_ARGS
USER_SUPPLIED_MAKE_ARGS
VENDOR
VENDOR_URL
VENDOR_BUG_URL
VENDOR_VERSION
VENDOR_VM_BUG_URL
WORKING_DIR
WORKSPACE_DIR
)
Expand Down

0 comments on commit 0636821

Please sign in to comment.