diff --git a/docs/.gitattributes b/docs/.gitattributes new file mode 100644 index 0000000000..5783af69de --- /dev/null +++ b/docs/.gitattributes @@ -0,0 +1,3 @@ +# Set line endings to LF, even on Windows. Otherwise, execution within Docker fails. +# See https://help.github.com/articles/dealing-with-line-endings/ +*.sh text eol=lf \ No newline at end of file diff --git a/docs/build.gradle b/docs/build.gradle index bea277c0e9..6599b8bb55 100644 --- a/docs/build.gradle +++ b/docs/build.gradle @@ -62,16 +62,8 @@ task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) { task buildDocs(dependsOn: ['apidocs', 'makeDocs']) task apidocs(dependsOn: ['dokka', 'dokkaJavadoc']) -task makeDocs(type: Exec, dependsOn: ['installDocsiteRequirements']) { - // TODO: Non-msys Windows script - commandLine 'cmd', '/c', 'bash make-docsite.sh' // Windows - commandLine 'bash', './make-docsite.sh' // Linux -} - -task installDocsiteRequirements(type: Exec) { - // TODO: Non-msys Windows script - commandLine 'cmd', '/c', 'bash install-docsite-requirements.sh' // Windows - commandLine 'bash', './install-docsite-requirements.sh' // Linux +task makeDocs(type: Exec) { + commandLine "docker", "run", "-v", "${project.projectDir}:/opt/docs_builder", "roastario/docs-builder:latest", "bash", "-c", "rm -rf build && rm -rf virtualenv && install-docsite-requirements.sh && make-docsite.sh" } apidocs.shouldRunAfter makeDocs diff --git a/docs/docs_builder/Dockerfile b/docs/docs_builder/Dockerfile new file mode 100644 index 0000000000..aa9fc6ebde --- /dev/null +++ b/docs/docs_builder/Dockerfile @@ -0,0 +1,6 @@ +FROM python:2-stretch + +RUN apt-get update && apt-get install -y texlive preview-latex-style texlive-generic-extra texlive-latex-extra latexmk dos2unix +VOLUME /opt/docs_builder +ENV PATH="/opt/docs_builder:${PATH}" +WORKDIR /opt/docs_builder \ No newline at end of file