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/07/01 01:55:19 UTC
[pulsar-site] branch fix/update-build-script-20220701 created (now 753491bef02)
This is an automated email from the ASF dual-hosted git repository.
urfree pushed a change to branch fix/update-build-script-20220701
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
at 753491bef02 clean all the old random js files because a new all version build done, all the js is regenerated with a random name
This branch includes the following new commits:
new 753491bef02 clean all the old random js files because a new all version build done, all the js is regenerated with a random name
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[pulsar-site] 01/01: clean all the old random js files because a new all version build done, all the js is regenerated with a random name
Posted by ur...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
urfree pushed a commit to branch fix/update-build-script-20220701
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
commit 753491bef02d2b9e1676ed25a364085799eaec9c
Author: Li Li <ur...@apache.org>
AuthorDate: Fri Jul 1 09:55:07 2022 +0800
clean all the old random js files because a new all version build done, all the js is regenerated with a random name
Signed-off-by: Li Li <ur...@apache.org>
---
site2/tools/publish-website.sh | 8 +++++--
site2/website-next/scripts/.gitignore | 3 ++-
site2/website-next/scripts/split-version-build.sh | 27 +++++++++++------------
3 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/site2/tools/publish-website.sh b/site2/tools/publish-website.sh
index 2ca07ddd830..1eb93093a0c 100755
--- a/site2/tools/publish-website.sh
+++ b/site2/tools/publish-website.sh
@@ -37,20 +37,24 @@ PULSAR_SITE_TMP=/tmp/pulsar-site
(
cd $ROOT_DIR
REVISION=$(git rev-parse --short HEAD)
+ BUILD_ALL=$(cat $ROOT_DIR/site2/website-next/scripts/.build)
rm -rf $PULSAR_SITE_TMP
mkdir $PULSAR_SITE_TMP
cd $PULSAR_SITE_TMP
- git clone "https://$GH_TOKEN@$ORIGIN_REPO" .
+ git clone -b $BRANCH_CONTENT --depth 1 "https://$GH_TOKEN@$ORIGIN_REPO" .
git config user.name "Pulsar Site Updater"
git config user.email "dev@pulsar.apache.org"
- git checkout $BRANCH_CONTENT
# copy the apache generated dir
if [ ! -d "$PULSAR_SITE_TMP/content/" ]; then
mkdir -p $PULSAR_SITE_TMP/content/
fi
+ if [[ $BUILD_ALL"" == "11" ]]; then
+ echo "clean all the old random js files because a new all version build done, all the js is regenerated with a random name"
+ rm -rf $PULSAR_SITE_TMP/content/assets/js
+ fi
cp -r $GENERATED_SITE_DIR/content/* $PULSAR_SITE_TMP/content
git add -A .
diff --git a/site2/website-next/scripts/.gitignore b/site2/website-next/scripts/.gitignore
index e028abce1a4..c409599d656 100644
--- a/site2/website-next/scripts/.gitignore
+++ b/site2/website-next/scripts/.gitignore
@@ -2,4 +2,5 @@ release-notes/
token
.latest
.versions
-.language
\ No newline at end of file
+.language
+.build
\ No newline at end of file
diff --git a/site2/website-next/scripts/split-version-build.sh b/site2/website-next/scripts/split-version-build.sh
index 9bafd4fa367..521980aa3fc 100755
--- a/site2/website-next/scripts/split-version-build.sh
+++ b/site2/website-next/scripts/split-version-build.sh
@@ -60,6 +60,16 @@ yarn write-translations
CURRENT_HOUR=$(date +%H)
CURRENT_HOUR=${CURRENT_HOUR#0}
echo "CURRENT_HOUR: "$CURRENT_HOUR
+
+if [[ $FORCE_BUILD_ALL_LANGUAGE"" == "1" ]] || [[ $FORCE_BUILD_ALL_LANGUAGE"" == "0" ]]; then
+ BUILD_ALL_LANGUAGE=$FORCE_BUILD_ALL_LANGUAGE""
+ echo "force build all languages"
+fi
+if [[ $FORCE_BUILD_ALL_VERSION"" == "1" ]] || [[ $FORCE_BUILD_ALL_VERSION"" == "0" ]]; then
+ BUILD_ALL_VERSION=$FORCE_BUILD_ALL_VERSION""
+ echo "force build all versions"
+fi
+
if [[ $CURRENT_HOUR -eq 0 ]] || [[ $FORCE_CROWDIN_ALL"" == "1" ]] || [[ $FORCE_CROWDIN_UP"" == "1" ]]; then
echo "exec crowdin upload"
yarn run crowdin-upload
@@ -67,24 +77,11 @@ else
echo "skip crowdin upload"
fi
-if [[ $CURRENT_HOUR -eq 18 ]] || [[ $FORCE_CROWDIN_ALL"" == "1" ]] || [[ $FORCE_CROWDIN_DOWN"" == "1" ]]; then
+if [[ $CURRENT_HOUR -eq 18 ]] || [[ $BUILD_ALL_LANGUAGE"" == "1" ]] || [[ $FORCE_CROWDIN_ALL"" == "1" ]] || [[ $FORCE_CROWDIN_DOWN"" == "1" ]]; then
echo "exec crowdin download"
yarn crowdin-download
- BUILD_ALL_LANGUAGE="1"
- BUILD_ALL_VERSION="1"
else
echo "skip crowdin download"
- BUILD_ALL_LANGUAGE="0"
- BUILD_ALL_VERSION="0"
-fi
-
-if [[ $FORCE_BUILD_ALL_LANGUAGE"" == "1" ]] || [[ $FORCE_BUILD_ALL_LANGUAGE"" == "0" ]]; then
- BUILD_ALL_LANGUAGE=$FORCE_BUILD_ALL_LANGUAGE""
- echo "force build all languages"
-fi
-if [[ $FORCE_BUILD_ALL_VERSION"" == "1" ]] || [[ $FORCE_BUILD_ALL_VERSION"" == "0" ]]; then
- BUILD_ALL_VERSION=$FORCE_BUILD_ALL_VERSION""
- echo "force build all versions"
fi
# Build only the versions that has changed
@@ -114,3 +111,5 @@ done <scripts/.versions
cp -r build-assets/* build/assets/
rm -rf build-assets
+
+echo $BUILD_ALL_VERSION""$BUILD_ALL_LANGUAGE >scripts/.build