Skip to content

Apache DataFusion SQL Query Engine

ARROW-7834: [Release] Post release task for updating the documentations

Krisztián Szűcs259b5a3994d3
diff --git a/ci/docker/linux-apt-docs.dockerfile b/ci/docker/linux-apt-docs.dockerfile
index 3c1bcd9914..366232d44b 100644
--- a/ci/docker/linux-apt-docs.dockerfile
+++ b/ci/docker/linux-apt-docs.dockerfile
@@ -18,23 +18,38 @@
ARG base
FROM ${base}
+ARG r=3.6
ARG jdk=8
-RUN apt-get update -y -q && \
- apt-get install -y -q --no-install-recommends \
+
+RUN apt-get update -y && \
+ apt-get install -y \
+ dirmngr \
+ apt-transport-https \
+ software-properties-common && \
+ apt-key adv \
+ --keyserver keyserver.ubuntu.com \
+ --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 && \
+ add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu '$(lsb_release -cs)'-cran35/' && \
+ apt-get install -y \
autoconf-archive \
automake \
doxygen \
gobject-introspection \
gtk-doc-tools \
+ libcurl4-openssl-dev \
libgirepository1.0-dev \
libglib2.0-doc \
libtool \
+ libxml2-dev \
ninja-build \
openjdk-${jdk}-jdk-headless \
- ruby-dev \
- rsync && \
+ pandoc \
+ r-base=${r}* \
+ rsync \
+ ruby-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
+
ENV JAVA_HOME=/usr/lib/jvm/java-${jdk}-openjdk-amd64
ARG maven=3.5.4
@@ -58,6 +73,11 @@ COPY c_glib/Gemfile /arrow/c_glib/
RUN gem install bundler && \
bundle install --gemfile /arrow/c_glib/Gemfile
+COPY ci/scripts/r_deps.sh /arrow/ci/scripts/
+COPY r/DESCRIPTION /arrow/r/
+RUN /arrow/ci/scripts/r_deps.sh /arrow && \
+ R -e "install.packages('pkgdown')"
+
ENV ARROW_PYTHON=ON \
ARROW_BUILD_STATIC=OFF \
ARROW_BUILD_TESTS=OFF \
diff --git a/ci/scripts/docs_build.sh b/ci/scripts/docs_build.sh
index c3bdb87c3d..91561717c0 100755
--- a/ci/scripts/docs_build.sh
+++ b/ci/scripts/docs_build.sh
@@ -28,16 +28,19 @@ export CFLAGS="-DARROW_NO_DEPRECATED_API"
export CXXFLAGS="-DARROW_NO_DEPRECATED_API"
# Prose and Python
-sphinx-build -b html ${arrow_dir}/docs/source ${build_dir}/sphinx
+sphinx-build -b html ${arrow_dir}/docs/source ${build_dir}
-# C++
-rsync -a --delete ${arrow_dir}/cpp/apidoc/* ${build_dir}/cpp
+# C++ - original doxygen
+# rsync -a ${arrow_dir}/cpp/apidoc/ ${build_dir}/cpp
+
+# R
+rsync -a ${arrow_dir}/r/docs/ ${build_dir}/r
# C GLib
-rsync -a --delete ${ARROW_HOME}/share/gtk-doc/html/* ${build_dir}/c_glib
+rsync -a ${ARROW_HOME}/share/gtk-doc/html/ ${build_dir}/c_glib
# Java
-rsync -a --delete ${arrow_dir}/java/target/site/apidocs ${build_dir}/java
+rsync -a ${arrow_dir}/java/target/site/apidocs/ ${build_dir}/java
# Javascript
-rsync -a --delete ${arrow_dir}/js/doc ${build_dir}/js
+rsync -a ${arrow_dir}/js/doc/ ${build_dir}/js
diff --git a/ci/scripts/r_build.sh b/ci/scripts/r_build.sh
new file mode 100755
index 0000000000..d1907a87c8
--- /dev/null
+++ b/ci/scripts/r_build.sh
@@ -0,0 +1,33 @@
+#!/usr/bin/env bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -ex
+
+: ${R_BIN:=R}
+source_dir=${1}/r
+with_docs=${2:-false}
+
+pushd ${source_dir}
+
+${R_BIN} CMD INSTALL .
+
+if [ "${with_docs}" == "true" ]; then
+ ${R_BIN} -e "pkgdown::build_site(install = FALSE)"
+fi
+
+popd
\ No newline at end of file
diff --git a/dev/release/post-03-website.sh b/dev/release/post-03-website.sh
index 1c7e3f7bf6..1203d1d958 100755
--- a/dev/release/post-03-website.sh
+++ b/dev/release/post-03-website.sh
@@ -16,13 +16,13 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
-#
+
set -e
set -u
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ARROW_DIR="${SOURCE_DIR}/../.."
-ARROW_SITE_DIR="${SOURCE_DIR}/../../../arrow-site"
+ARROW_SITE_DIR="${ARROW_DIR}/../arrow-site"
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <previous-version> <version>"
@@ -258,9 +258,7 @@ github_url=$(git remote get-url origin | \
-e 's,\.git$,,')
echo "Success!"
-echo "1. Open a JIRA issue:"
-echo " https://issues.apache.org/jira/projects/ARROW/issues/"
-echo "2. Create a pull request:"
+echo "Create a pull request:"
echo " ${github_url}/pull/new/${branch_name}"
popd
diff --git a/dev/release/post-09-docs.sh b/dev/release/post-09-docs.sh
new file mode 100755
index 0000000000..75f6699d49
--- /dev/null
+++ b/dev/release/post-09-docs.sh
@@ -0,0 +1,56 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+set -e
+set -u
+
+SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
+ARROW_DIR="${SOURCE_DIR}/../.."
+ARROW_SITE_DIR="${ARROW_DIR}/../arrow-site"
+
+if [ "$#" -ne 1 ]; then
+ echo "Usage: $0 <version>"
+ exit 1
+fi
+
+version=$1
+branch_name=release-docs-${version}
+
+pushd "${ARROW_SITE_DIR}"
+git checkout asf-site
+git checkout -b ${branch_name}
+rm -rf docs/*
+popd
+
+pushd "${ARROW_DIR}"
+docker-compose build ubuntu-cpp
+docker-compose build ubuntu-python
+docker-compose build ubuntu-docs
+docker-compose run --rm -v "${ARROW_SITE_DIR}/docs:/build/docs" ubuntu-docs
+popd
+
+pushd "${ARROW_SITE_DIR}"
+git add docs
+git commit -m "[Website] Update documentations for ${version}"
+git push -u origin ${branch_name}
+popd
+
+echo "Success!"
+echo "Create a pull request:"
+echo " ${github_url}/pull/new/${branch_name}"
\ No newline at end of file
diff --git a/docker-compose.yml b/docker-compose.yml
index 2f043895ee..4b0c3391d8 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -996,6 +996,7 @@ services:
/arrow/ci/scripts/python_build.sh /arrow /build &&
/arrow/ci/scripts/java_build.sh /arrow /build true &&
/arrow/ci/scripts/js_build.sh /arrow true &&
+ /arrow/ci/scripts/r_build.sh /arrow true &&
/arrow/ci/scripts/docs_build.sh /arrow /build"
################################# Tools #####################################