Skip to content

Commit

Permalink
Update version numbers for 11+ to drop "+" bits
Browse files Browse the repository at this point in the history
See #235 (comment) for details.  Previously, "11+28" was "11-ea+28", but build 28 became GA and the next release will be 11.0.1, so tagging "11+28" simply "11" is appropriate.
  • Loading branch information
tianon committed Sep 28, 2018
1 parent 2eedac4 commit bca955f
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 30 deletions.
2 changes: 1 addition & 1 deletion 10/jdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN { \
RUN ln -svT "/usr/lib/jvm/java-10-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 10.0.2+13
ENV JAVA_VERSION 10.0.2
ENV JAVA_DEBIAN_VERSION 10.0.2+13-1

RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion 10/jdk/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN { \
RUN ln -svT "/usr/lib/jvm/java-10-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 10.0.2+13
ENV JAVA_VERSION 10.0.2
ENV JAVA_DEBIAN_VERSION 10.0.2+13-1

RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion 10/jre/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN { \
RUN ln -svT "/usr/lib/jvm/java-10-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 10.0.2+13
ENV JAVA_VERSION 10.0.2
ENV JAVA_DEBIAN_VERSION 10.0.2+13-1

RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion 10/jre/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN { \
RUN ln -svT "/usr/lib/jvm/java-10-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 10.0.2+13
ENV JAVA_VERSION 10.0.2
ENV JAVA_DEBIAN_VERSION 10.0.2+13-1

RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion 11/jdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN { \
RUN ln -svT "/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 11-ea+28
ENV JAVA_VERSION 11
ENV JAVA_DEBIAN_VERSION 11~28-2

RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion 11/jdk/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN { \
RUN ln -svT "/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 11-ea+28
ENV JAVA_VERSION 11
ENV JAVA_DEBIAN_VERSION 11~28-2

RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion 11/jdk/windows/windowsservercore-1709/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
setx /M PATH $newPath

# http://jdk.java.net/
ENV JAVA_VERSION 11-ea+28
ENV JAVA_VERSION 11
ENV JAVA_URL https://download.java.net/java/GA/jdk11/28/GPL/openjdk-11+28_windows-x64_bin.zip
ENV JAVA_SHA256 fde3b28ca31b86a889c37528f17411cd0b9651beb6fa76cac89a223417910f4b

Expand Down
2 changes: 1 addition & 1 deletion 11/jdk/windows/windowsservercore-1803/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
setx /M PATH $newPath

# http://jdk.java.net/
ENV JAVA_VERSION 11-ea+28
ENV JAVA_VERSION 11
ENV JAVA_URL https://download.java.net/java/GA/jdk11/28/GPL/openjdk-11+28_windows-x64_bin.zip
ENV JAVA_SHA256 fde3b28ca31b86a889c37528f17411cd0b9651beb6fa76cac89a223417910f4b

Expand Down
2 changes: 1 addition & 1 deletion 11/jdk/windows/windowsservercore-ltsc2016/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ RUN $newPath = ('{0}\bin;{1}' -f $env:JAVA_HOME, $env:PATH); \
setx /M PATH $newPath

# http://jdk.java.net/
ENV JAVA_VERSION 11-ea+28
ENV JAVA_VERSION 11
ENV JAVA_URL https://download.java.net/java/GA/jdk11/28/GPL/openjdk-11+28_windows-x64_bin.zip
ENV JAVA_SHA256 fde3b28ca31b86a889c37528f17411cd0b9651beb6fa76cac89a223417910f4b

Expand Down
2 changes: 1 addition & 1 deletion 11/jre/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN { \
RUN ln -svT "/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 11-ea+28
ENV JAVA_VERSION 11
ENV JAVA_DEBIAN_VERSION 11~28-2

RUN set -ex; \
Expand Down
2 changes: 1 addition & 1 deletion 11/jre/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ RUN { \
RUN ln -svT "/usr/lib/jvm/java-11-openjdk-$(dpkg --print-architecture)" /docker-java-home
ENV JAVA_HOME /docker-java-home

ENV JAVA_VERSION 11-ea+28
ENV JAVA_VERSION 11
ENV JAVA_DEBIAN_VERSION 11~28-2

RUN set -ex; \
Expand Down
47 changes: 28 additions & 19 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ for javaVersion in "${versions[@]}"; do
tilde='~'
case "$javaVersion" in
10 | 11)
# update Debian's "10~39" to "10-ea+39" (matching http://jdk.java.net/10/)
# update Debian's "11~8" to "11-ea+8" (matching http://jdk.java.net/11/)
fullVersion="${fullVersion//$javaVersion$tilde/$javaVersion-ea+}"
# https://github.com/docker-library/openjdk/pull/235#issuecomment-425378941
fullVersion="${fullVersion%%$tilde*}"
fullVersion="${fullVersion%%+*}"
;;
esac
fullVersion="${fullVersion//$tilde/-}"
Expand Down Expand Up @@ -381,7 +381,7 @@ EOD
case "$javaVersion" in
8 | 10)
ojdkbuildVersion="$(
git ls-remote --tags 'https://github.com/ojdkbuild/ojdkbuild' \
git ls-remote --tags 'https://github.com/ojdkbuild/ojdkbuild.git' \
| cut -d/ -f3 \
| grep -E '^(1[.])?'"$javaVersion"'[.-]' \
| sort -V \
Expand All @@ -406,19 +406,27 @@ EOD
exit 1
fi

if [[ "$ojdkbuildVersion" == *-ea-* ]]; then
# convert "9-ea-b154-1" into "9-b154"
ojdkJavaVersion="$(echo "$ojdkbuildVersion" | sed -r 's/-ea-/-/' | cut -d- -f1,2)"
elif [[ "$ojdkbuildVersion" == 1.* ]]; then
# convert "1.8.0.111-3" into "8u111"
ojdkJavaVersion="$(echo "$ojdkbuildVersion" | cut -d. -f2,4 | cut -d- -f1 | tr . u)"
elif [[ "$ojdkbuildVersion" == 10.* ]]; then
# convert "10.0.1-1.b10" into "10.0.1"
ojdkJavaVersion="${ojdkbuildVersion%%-*}"
else
echo >&2 "error: unable to parse ojdkbuild version $ojdkbuildVersion"
exit 1
fi
case "$ojdkbuildVersion" in
*-ea-* )
# convert "9-ea-b154-1" into "9-b154"
ojdkJavaVersion="$(echo "$ojdkbuildVersion" | sed -r 's/-ea-/-/' | cut -d- -f1,2)"
;;

1.* )
# convert "1.8.0.111-3" into "8u111"
ojdkJavaVersion="$(echo "$ojdkbuildVersion" | cut -d. -f2,4 | cut -d- -f1 | tr . u)"
;;

10.* )
# convert "10.0.1-1.b10" into "10.0.1"
ojdkJavaVersion="${ojdkbuildVersion%%-*}"
;;

* )
echo >&2 "error: unable to parse ojdkbuild version $ojdkbuildVersion"
exit 1
;;
esac

echo "$javaVersion-$javaType: $ojdkJavaVersion (windows ojdkbuild $ojdkbuildVersion)"

Expand All @@ -441,8 +449,9 @@ EOD
downloadVersion="${downloadVersion#openjdk-}"

if [ "$javaVersion" = '11' ]; then
# convert "11+28" into "11-ea+28" for consistency
downloadVersion="${downloadVersion//+/-ea+}"
# 11 is now GA, so drop any +NN (https://github.com/docker-library/openjdk/pull/235#issuecomment-425378941)
# future releases will be 11.0.1, for example
downloadVersion="${downloadVersion%%+*}"
fi

echo "$javaVersion-$javaType: $downloadVersion (windows)"
Expand Down

0 comments on commit bca955f

Please sign in to comment.