tisonkun commented on code in PR #259:
URL: https://github.com/apache/pulsar-site/pull/259#discussion_r1007509569


##########
site2/tools/build-site.sh:
##########
@@ -50,11 +50,8 @@ bash scripts/split-version-build.sh $@
 cd "$WEBSITE_DIR"
 
 CONTENT_DIR="$GEN_SITE_DIR"/content
-
-rm -rf "$CONTENT_DIR"
-mkdir -p "$CONTENT_DIR"
-mkdir -p "$CONTENT_DIR"/reference
-rsync -a ./docsify/ "$CONTENT_DIR"/reference
+rm -rf "$CONTENT_DIR" && mkdir -p "$CONTENT_DIR"
+cp -R static/reference "$CONTENT_DIR"
 rsync -a ./build/ "$CONTENT_DIR"

Review Comment:
   `cp -R` seems work differently to the standard on the CI env. Use `rsync -a` 
correctly stably copy all files (including hidden files) recursively.
   
   Besides, since we move references under the `static` folder, there's no need 
to special handle them.
   
   Thus, this code snippet can be written as:
   
   ```bash
   rm -rf "$CONTENT_DIR"
   mkdir -p "$CONTENT_DIR"
   rsync -a ./build/ "$CONTENT_DIR"
   ```
   
   @urfreespace @SignorMercurio please check.



-- 
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