From a3e732abc1e5b5b325d3d8ff7a51d932e6bb80ab Mon Sep 17 00:00:00 2001 From: Colin Alworth Date: Fri, 10 Nov 2023 12:10:44 -0600 Subject: [PATCH 1/2] Avoid extra copying of r docs Also prevents a dependency cycle that Gradle might complain about. --- R/build.gradle | 29 ++++++++++++++--------------- R/r-doc.sh | 11 ----------- 2 files changed, 14 insertions(+), 26 deletions(-) diff --git a/R/build.gradle b/R/build.gradle index 10fa09cfdbe..2d4b084fcea 100644 --- a/R/build.gradle +++ b/R/build.gradle @@ -38,7 +38,6 @@ def buildRClient = Docker.registerDockerTask(project, 'rClient') { include 'rdeephaven/NAMESPACE' include 'rdeephaven/README.md' include 'rdeephaven/inst/**' - include 'rdeephaven/man/**' include 'rdeephaven/etc/**' include 'rdeephaven/R/**' include 'rdeephaven/src/*.cpp' @@ -54,14 +53,13 @@ def buildRClient = Docker.registerDockerTask(project, 'rClient') { /out \\ ${prefix}/log \\ ${prefix}/bin/rdeephaven \\ - ${prefix}/src/rdeephaven/{inst,man,etc,src,R,bin} + ${prefix}/src/rdeephaven/{inst,etc,src,R,bin} """) copyFile('rdeephaven/DESCRIPTION', "${prefix}/src/rdeephaven/") copyFile('rdeephaven/LICENSE', "${prefix}/src/rdeephaven/") copyFile('rdeephaven/NAMESPACE', "${prefix}/src/rdeephaven/") copyFile('rdeephaven/README.md', "${prefix}/src/rdeephaven/") copyFile('rdeephaven/inst/', "${prefix}/src/rdeephaven/inst/") - copyFile('rdeephaven/man/', "${prefix}/src/rdeephaven/man/") copyFile('rdeephaven/etc/', "${prefix}/src/rdeephaven/etc/") copyFile('rdeephaven/R/', "${prefix}/src/rdeephaven/R/") copyFile('rdeephaven/src/*.cpp', "${prefix}/src/rdeephaven/src/") @@ -115,7 +113,7 @@ def rClientDoc = Docker.registerDockerTask(project, 'rClientDoc') { } } copyOut { - into layout.buildDirectory.dir('man') + into layout.projectDirectory.dir('rdeephaven/man') } dockerfile { from('deephaven/r-client:local-build') @@ -153,19 +151,20 @@ def rClientDoc = Docker.registerDockerTask(project, 'rClientDoc') { copyFile('r-doc.sh', "${prefix}/bin/rdeephaven") } parentContainers = [ project.tasks.getByName('rClient') ] - entrypoint = ["${prefix}/bin/rdeephaven/r-doc.sh", '/out'] + entrypoint = ["${prefix}/bin/rdeephaven/r-doc.sh"] + containerOutPath = "${prefix}/src/rdeephaven/man" } -task updateRClientDoc { - dependsOn rClientDoc - doLast { - exec { - workingDir '.' - commandLine 'rm', '-f', 'man/*' - commandLine 'tar', '-C', 'rdeephaven', '-zxvf', 'build/man/man.tgz' - } - } -} +//task updateRClientDoc { +// dependsOn rClientDoc +// doLast { +// exec { +// workingDir '.' +// commandLine 'rm', '-f', 'rdeephaven/man/*' +// commandLine 'tar', '-C', 'rdeephaven', '-zxvf', 'build/man/man.tgz' +// } +// } +//} deephavenDocker.shouldLogIfTaskFails testRClient tasks.check.dependsOn(testRClient) diff --git a/R/r-doc.sh b/R/r-doc.sh index 239ce1a425b..39c51fe754a 100755 --- a/R/r-doc.sh +++ b/R/r-doc.sh @@ -2,11 +2,6 @@ set -euo pipefail -if [ "$#" -ne 1 ]; then - echo "Usage: $0 output-dir" 1>&2 - exit 1 -fi - if [ -z "${DH_PREFIX}" ]; then echo "$0: Environment variable DH_PREFIX is not set, aborting." 1>&2 exit 1 @@ -16,8 +11,6 @@ source $DH_PREFIX/env.sh cd $DH_PREFIX/src/rdeephaven -OUT_DIR="$1" - R --no-save --no-restore < Date: Fri, 10 Nov 2023 12:15:43 -0600 Subject: [PATCH 2/2] Remove commented out code --- R/build.gradle | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/R/build.gradle b/R/build.gradle index 2d4b084fcea..96c00db6d86 100644 --- a/R/build.gradle +++ b/R/build.gradle @@ -155,16 +155,5 @@ def rClientDoc = Docker.registerDockerTask(project, 'rClientDoc') { containerOutPath = "${prefix}/src/rdeephaven/man" } -//task updateRClientDoc { -// dependsOn rClientDoc -// doLast { -// exec { -// workingDir '.' -// commandLine 'rm', '-f', 'rdeephaven/man/*' -// commandLine 'tar', '-C', 'rdeephaven', '-zxvf', 'build/man/man.tgz' -// } -// } -//} - deephavenDocker.shouldLogIfTaskFails testRClient tasks.check.dependsOn(testRClient)