Skip to content
Permalink
Browse files

Enforce JDK8 when running `publish-docs.sh` (#973)

Motivation:

Different JDK versions produce different website style for
javadoc.

Modifications:

- Make sure the current Java version is 1.8 before running
`publish-docs.sh`;

Result:

Javadoc website always published with the consistent format
and style.
  • Loading branch information
idelpivnitskiy committed Mar 20, 2020
1 parent 3c222b2 commit 666a16b35c3d341ada82557429d3264cc55b9caf
Showing with 7 additions and 0 deletions.
  1. +7 −0 scripts/publish-docs.sh
@@ -48,6 +48,13 @@ function clean_up_gh_pages() {
rm -rf gh-pages
}

# Enforce JDK8 to keep javadoc format consistent for all versions:
java_version=$(./gradlew --no-daemon -version | grep ^JVM: | awk -F\. '{gsub(/^JVM:[ \t]*/,"",$1); print $1"."$2}')
if [ "$java_version" != "1.8" ]; then
echo "Docs can be published only using Java 1.8, current version: $java_version"
exit 1
fi

if [ "$#" -eq "0" ]; then
echo "Publishing docs website for the SNAPSHOT version only"
elif [ "$#" -eq "1" ]; then

0 comments on commit 666a16b

Please sign in to comment.
You can’t perform that action at this time.