You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/02/18 00:18:19 UTC

[GitHub] [arrow] kou commented on a change in pull request #12355: ARROW-15601: [Docs][Release] Update post release script to move stable docs + keep dev docs

kou commented on a change in pull request #12355:
URL: https://github.com/apache/arrow/pull/12355#discussion_r809576331



##########
File path: dev/release/post-09-docs.sh
##########
@@ -43,22 +53,39 @@ git checkout -b asf-site origin/asf-site
 git rebase apache/asf-site
 git branch -D ${branch_name} || :
 git checkout -b ${branch_name}
+# list and remove previous versioned docs
 versioned_paths=()
 for versioned_path in docs/*.0/; do
   versioned_paths+=(${versioned_path})
+  rm -rf ${versioned_path}
 done
+# add to list and remove dev docs
+versioned_paths+=("docs/dev/")
+rm -rf docs/dev/
+if [ "$is_major_release" = true ] ; then
+  # copy the current stable docs to temporary directory
+  # (remove java reference to reduce size)
+  rm -rf docs/java/reference/
+  cp -r docs/ docs_temp/
+fi
+# delete current stable docs and restore all previous versioned docs
 rm -rf docs/*
 git checkout "${versioned_paths[@]}"
 curl \
   --fail \
   --location \
   --remote-name \
   https://apache.jfrog.io/artifactory/arrow/docs/${version}/docs.tar.gz
+cp ../docs.tar.gz .
 tar xvf docs.tar.gz
 rm -f docs.tar.gz
 git checkout docs/c_glib/index.html
+if [ "$is_major_release" = true ] ; then
+  mv docs_temp docs/${previous_version}
+fi
 git add docs
 git commit -m "[Website] Update documentations for ${version}"
+git clean -d -f -x

Review comment:
       Is this needed?

##########
File path: dev/release/post-09-docs.sh
##########
@@ -43,22 +53,39 @@ git checkout -b asf-site origin/asf-site
 git rebase apache/asf-site
 git branch -D ${branch_name} || :
 git checkout -b ${branch_name}
+# list and remove previous versioned docs
 versioned_paths=()
 for versioned_path in docs/*.0/; do
   versioned_paths+=(${versioned_path})
+  rm -rf ${versioned_path}
 done
+# add to list and remove dev docs
+versioned_paths+=("docs/dev/")
+rm -rf docs/dev/
+if [ "$is_major_release" = true ] ; then

Review comment:
       ```suggestion
   if [ "$is_major_release" = "yes" ] ; then
   ```

##########
File path: dev/release/post-09-docs.sh
##########
@@ -43,22 +53,39 @@ git checkout -b asf-site origin/asf-site
 git rebase apache/asf-site
 git branch -D ${branch_name} || :
 git checkout -b ${branch_name}
+# list and remove previous versioned docs
 versioned_paths=()
 for versioned_path in docs/*.0/; do
   versioned_paths+=(${versioned_path})
+  rm -rf ${versioned_path}
 done
+# add to list and remove dev docs
+versioned_paths+=("docs/dev/")
+rm -rf docs/dev/
+if [ "$is_major_release" = true ] ; then
+  # copy the current stable docs to temporary directory
+  # (remove java reference to reduce size)
+  rm -rf docs/java/reference/
+  cp -r docs/ docs_temp/
+fi
+# delete current stable docs and restore all previous versioned docs
 rm -rf docs/*
 git checkout "${versioned_paths[@]}"
 curl \
   --fail \
   --location \
   --remote-name \
   https://apache.jfrog.io/artifactory/arrow/docs/${version}/docs.tar.gz
+cp ../docs.tar.gz .

Review comment:
       Is this needed?
   It seems that `../docs.tar.gz` doesn't exist.

##########
File path: dev/release/post-09-docs.sh
##########
@@ -43,22 +53,39 @@ git checkout -b asf-site origin/asf-site
 git rebase apache/asf-site
 git branch -D ${branch_name} || :
 git checkout -b ${branch_name}
+# list and remove previous versioned docs
 versioned_paths=()
 for versioned_path in docs/*.0/; do
   versioned_paths+=(${versioned_path})
+  rm -rf ${versioned_path}
 done
+# add to list and remove dev docs
+versioned_paths+=("docs/dev/")
+rm -rf docs/dev/
+if [ "$is_major_release" = true ] ; then
+  # copy the current stable docs to temporary directory
+  # (remove java reference to reduce size)
+  rm -rf docs/java/reference/
+  cp -r docs/ docs_temp/
+fi
+# delete current stable docs and restore all previous versioned docs
 rm -rf docs/*
 git checkout "${versioned_paths[@]}"
 curl \
   --fail \
   --location \
   --remote-name \
   https://apache.jfrog.io/artifactory/arrow/docs/${version}/docs.tar.gz
+cp ../docs.tar.gz .
 tar xvf docs.tar.gz
 rm -f docs.tar.gz
 git checkout docs/c_glib/index.html
+if [ "$is_major_release" = true ] ; then

Review comment:
       ```suggestion
   if [ "$is_major_release" = "yes" ] ; then
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org