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/06/09 01:40:01 UTC

[pulsar-site] branch main updated: update build script

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 b3570a1698e update build script
b3570a1698e is described below

commit b3570a1698e367d9426443fa5a2beb88343ef6a3
Author: Li Li <ur...@apache.org>
AuthorDate: Thu Jun 9 09:39:51 2022 +0800

    update build script
    
    Signed-off-by: Li Li <ur...@apache.org>
---
 site2/tools/build-site.sh                         | 4 ++--
 site2/website-next/scripts/split-version-build.sh | 9 +++++++--
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/site2/tools/build-site.sh b/site2/tools/build-site.sh
index 0eef0620542..e05fb46b368 100755
--- a/site2/tools/build-site.sh
+++ b/site2/tools/build-site.sh
@@ -76,13 +76,13 @@ if [ -n "$NEXT" ]; then
   CURRENT_HOUR=$(date +%H)
   CURRENT_HOUR=${CURRENT_HOUR#0}
   echo "------ crowdin envs:" "CROWDIN_UPLOAD: "$CROWDIN_UPLOAD "CROWDIN_DOWNLOAD: "$CROWDIN_DOWNLOAD "CURRENT_HOUR: "$CURRENT_HOUR
-  if [[ "$CROWDIN_UPLOAD" == "1" || $CURRENT_HOUR -eq 6 ]]; then
+  if [[ "$CROWDIN_UPLOAD" == "1" || $CURRENT_HOUR -eq 0 ]]; then
     echo "------ exec crowdin upload"
     yarn run crowdin-upload
   else
     echo "------ skip crowdin upload"
   fi
-  if [[ "$CROWDIN_DOWNLOAD" == "1" || $CURRENT_HOUR -eq 12 ]]; then
+  if [[ "$CROWDIN_DOWNLOAD" == "1" || $CURRENT_HOUR -eq 18 ]]; then
     echo "------ exec crowdin download"
     yarn crowdin-download
     echo 'all' >scripts/.language
diff --git a/site2/website-next/scripts/split-version-build.sh b/site2/website-next/scripts/split-version-build.sh
index 64b9bc9aca9..5f468aa8179 100755
--- a/site2/website-next/scripts/split-version-build.sh
+++ b/site2/website-next/scripts/split-version-build.sh
@@ -48,8 +48,13 @@ function _buildVersion() {
     echo "..." $buildVersion "build done..."
 }
 
-# force build all versions
-# BUILD_ALL_VERSION="1"
+CURRENT_HOUR=$(date +%H)
+CURRENT_HOUR=${CURRENT_HOUR#0}
+if [[ $CURRENT_HOUR -eq 18 ]]; then
+    BUILD_ALL_VERSION="1"
+else
+    BUILD_ALL_VERSION="0"
+fi
 
 # sometimes need build specify versions
 SUPPLEMENT_VERSIONS=$latest