Skip to content

Commit

Permalink
Bugfix: Move al2023 generic version updates out
Browse files Browse the repository at this point in the history
  • Loading branch information
rgithubli committed Aug 2, 2023
1 parent 8bd7e63 commit 0cb25a0
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion bin/update-dockerfiles.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ update_generic_linux() {
jdk_build=$(echo ${CORRETTO_VERSION} | cut -d'.' -f4)
corretto_version=$(echo ${CORRETTO_VERSION} | cut -d'.' -f5)
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2-generic/Dockerfile
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2023-generic/Dockerfile

if [[ "${LTS_VERSIONS[*]}" =~ ${MAJOR_RELEASE} ]]; then
${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2023/Dockerfile
Expand Down Expand Up @@ -83,6 +82,17 @@ update_generic_linux() {
fi
}

update_al2023_generic_linux() {
CORRETTO_VERSION=$1
MAJOR_RELEASE=$2

jdk_version=$(echo ${CORRETTO_VERSION} | cut -d'.' -f1-3)
jdk_build=$(echo ${CORRETTO_VERSION} | cut -d'.' -f4)
corretto_version=$(echo ${CORRETTO_VERSION} | cut -d'.' -f5)

${SED} "s/ARG version=.*/ARG version=${jdk_version}.${jdk_build}-${corretto_version}/g" ./${MAJOR_RELEASE}/jdk/al2023-generic/Dockerfile
}

while [ "$1" != "" ]; do
case $1 in
--help )
Expand Down Expand Up @@ -112,6 +122,7 @@ fi

if [ ! -z "${CORRETTO_20_GENERIC_LINUX}" ]; then
update_generic_linux ${CORRETTO_20_GENERIC_LINUX} 20
update_al2023_generic_linux ${CORRETTO_20_GENERIC_LINUX} 20
fi

if [ ! -z "${CORRETTO_8_GENERIC_LINUX}" ]; then
Expand Down

0 comments on commit 0cb25a0

Please sign in to comment.