aboutsummaryrefslogtreecommitdiff
path: root/R/create-docs.sh
diff options
context:
space:
mode:
authorFelix Cheung <felixcheung_m@hotmail.com>2016-11-11 15:49:55 -0800
committerShivaram Venkataraman <shivaram@cs.berkeley.edu>2016-11-11 15:49:55 -0800
commitba23f768f7419039df85530b84258ec31f0c22b4 (patch)
tree20d35c6fcf8fad0231e8120dee6dbfbf0333c2b6 /R/create-docs.sh
parent6e95325fc3726d260054bd6e7c0717b3c139917e (diff)
downloadspark-ba23f768f7419039df85530b84258ec31f0c22b4.tar.gz
spark-ba23f768f7419039df85530b84258ec31f0c22b4.tar.bz2
spark-ba23f768f7419039df85530b84258ec31f0c22b4.zip
[SPARK-18264][SPARKR] build vignettes with package, update vignettes for CRAN release build and add info on release
## What changes were proposed in this pull request? Changes to DESCRIPTION to build vignettes. Changes the metadata for vignettes to generate the recommended format (which is about <10% of size before). Unfortunately it does not look as nice (before - left, after - right) ![image](https://cloud.githubusercontent.com/assets/8969467/20040492/b75883e6-a40d-11e6-9534-25cdd5d59a8b.png) ![image](https://cloud.githubusercontent.com/assets/8969467/20040490/a40f4d42-a40d-11e6-8c91-af00ddcbdad9.png) Also add information on how to run build/release to CRAN later. ## How was this patch tested? manually, unit tests shivaram We need this for branch-2.1 Author: Felix Cheung <felixcheung_m@hotmail.com> Closes #15790 from felixcheung/rpkgvignettes.
Diffstat (limited to 'R/create-docs.sh')
-rwxr-xr-xR/create-docs.sh19
1 files changed, 1 insertions, 18 deletions
diff --git a/R/create-docs.sh b/R/create-docs.sh
index 69ffc5f678..84e6aa928c 100755
--- a/R/create-docs.sh
+++ b/R/create-docs.sh
@@ -20,7 +20,7 @@
# Script to create API docs and vignettes for SparkR
# This requires `devtools`, `knitr` and `rmarkdown` to be installed on the machine.
-# After running this script the html docs can be found in
+# After running this script the html docs can be found in
# $SPARK_HOME/R/pkg/html
# The vignettes can be found in
# $SPARK_HOME/R/pkg/vignettes/sparkr_vignettes.html
@@ -52,21 +52,4 @@ Rscript -e 'libDir <- "../../lib"; library(SparkR, lib.loc=libDir); library(knit
popd
-# Find Spark jars.
-if [ -f "${SPARK_HOME}/RELEASE" ]; then
- SPARK_JARS_DIR="${SPARK_HOME}/jars"
-else
- SPARK_JARS_DIR="${SPARK_HOME}/assembly/target/scala-$SPARK_SCALA_VERSION/jars"
-fi
-
-# Only create vignettes if Spark JARs exist
-if [ -d "$SPARK_JARS_DIR" ]; then
- # render creates SparkR vignettes
- Rscript -e 'library(rmarkdown); paths <- .libPaths(); .libPaths(c("lib", paths)); Sys.setenv(SPARK_HOME=tools::file_path_as_absolute("..")); render("pkg/vignettes/sparkr-vignettes.Rmd"); .libPaths(paths)'
-
- find pkg/vignettes/. -not -name '.' -not -name '*.Rmd' -not -name '*.md' -not -name '*.pdf' -not -name '*.html' -delete
-else
- echo "Skipping R vignettes as Spark JARs not found in $SPARK_HOME"
-fi
-
popd