You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ur...@apache.org on 2022/05/24 05:15:21 UTC

[pulsar-site] 01/01: optimize watch script

This is an automated email from the ASF dual-hosted git repository.

urfree pushed a commit to branch fix/watch-files-change-script
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git

commit 83e17d49d59fde4054586f563be910e4f5fc7ecd
Author: Li Li <ur...@apache.org>
AuthorDate: Tue May 24 13:14:59 2022 +0800

    optimize watch script
    
    Signed-off-by: Li Li <ur...@apache.org>
---
 site2/website-next/scripts/watch.js | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/site2/website-next/scripts/watch.js b/site2/website-next/scripts/watch.js
index f8adcffae9a..697a2aa3d7f 100644
--- a/site2/website-next/scripts/watch.js
+++ b/site2/website-next/scripts/watch.js
@@ -41,6 +41,10 @@ watcher
     } else if (/\/website\/(.*)/.exec(path)) {
       const r = /\/website\/(.*)/.exec(path);
       dest += "/" + r[1];
+    } else {
+      console.log(path, "has been changed, do a full sync");
+      execa("sh scripts/sync-docs.sh " + src).stdout.pipe(process.stdout);
+      return;
     }
     console.log(path, "has been changed, sync to " + dest);
     execa("cp -r " + path + " " + dest).stdout.pipe(process.stdout);