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/03/25 04:28:26 UTC

[pulsar-site] branch main updated: feat: crowdin actions optimize

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

urfree pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new 602a767  feat: crowdin actions optimize
602a767 is described below

commit 602a76715b75e4d13f9fa3218d62967cd9d6c268
Author: LiLi <ur...@apache.org>
AuthorDate: Fri Mar 25 12:28:17 2022 +0800

    feat: crowdin actions optimize
    
    Signed-off-by: LiLi <ur...@apache.org>
---
 site2/tools/build-site.sh | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/site2/tools/build-site.sh b/site2/tools/build-site.sh
index 45c5b1c..0206ae1 100755
--- a/site2/tools/build-site.sh
+++ b/site2/tools/build-site.sh
@@ -102,16 +102,19 @@ yarn
 if [ -n "$NEXT" ]; then
   yarn write-translations
   CURRENT_HOUR=$(date +%H)
-  echo "------ crowdin envs:" $CROWDIN_UPLOAD $CROWDIN_DOWNLOAD $CURRENT_HOUR
-  if [[ "$CROWDIN_UPLOAD" == "1" || $CURRENT_HOUR -lt 6 ]]; then
-    echo "------ crowdin upload"
+  echo "------ crowdin envs:" "CROWDIN_UPLOAD: "$CROWDIN_UPLOAD "CROWDIN_DOWNLOAD: "$CROWDIN_DOWNLOAD "CURRENT_HOUR: "$CURRENT_HOUR
+  if [[ "$CROWDIN_UPLOAD" == "1" || $CURRENT_HOUR -eq 6 ]]; then
+    echo "------ exec crowdin upload"
     yarn run crowdin-upload
+  else 
+    echo "------ skip crowdin upload"
   fi
-  if [[ "$CROWDIN_DOWNLOAD" == "1" || $CURRENT_HOUR -gt 12 ]]; then
-    echo "------ crowdin download"
+  if [[ "$CROWDIN_DOWNLOAD" == "1" || $CURRENT_HOUR -eq 12 ]]; then
+    echo "------ exec crowdin download"
     yarn crowdin-download
     echo 'all' > scripts/.language
   else
+    echo "------ skip crowdin download"
     echo 'en' > scripts/.language
   fi