Skip to content

Commit

Permalink
Updated script to create .hgtip after getting jdk (#2036)
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Bailey <Austin.Bailey@ibm.com>
  • Loading branch information
Austin Bailey authored Sep 1, 2020
1 parent 9ec93a8 commit e9d3ebf
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions sbin/prepareWorkspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ checkoutAndCloneOpenJDKGitRepo() {

updateOpenj9Sources

createSourceTagFile

cd "${BUILD_CONFIG[WORKSPACE_DIR]}"
}

Expand Down Expand Up @@ -628,6 +630,25 @@ applyPatches() {
fi
}

# jdk8u requires a .hgtip file to populate the "SOURCE" tag in the release file.
# Creates .hgtip and populates it with the git sha of the last commit(s).
createSourceTagFile(){
if [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ]; then
local OpenJDK_TopDir="${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}"
local OpenJDK_SHA=$(git -C $OpenJDK_TopDir rev-parse --short HEAD)
if [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]; then
# OpenJ9 list 3 SHA's in their release file: OpenJDK, OpenJ9, and OMR.
local OpenJ9_TopDir="$OpenJDK_TopDir/openj9"
local OMR_TopDir="$OpenJDK_TopDir/omr"
local OpenJ9_SHA=$(git -C $OpenJ9_TopDir rev-parse --short HEAD)
local OMR_SHA=$(git -C $OMR_TopDir rev-parse --short HEAD)
(printf "OpenJDK: %s OpenJ9: %s OMR: %s" $OpenJDK_SHA $OpenJ9_SHA $OMR_SHA) > $OpenJDK_TopDir/.hgtip
else # Other variants only list the main repo SHA.
(printf "OpenJDK: %s" $OpenJDK_SHA) > $OpenJDK_TopDir/.hgtip
fi
fi
}

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

function configureWorkspace() {
Expand Down

0 comments on commit e9d3ebf

Please sign in to comment.