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



##########
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:
       Ah, I see.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to