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/09/28 07:52:24 UTC

[pulsar-site] branch main updated: Fixed token parameter passing

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 cdbe1b6e6e8 Fixed token parameter passing
cdbe1b6e6e8 is described below

commit cdbe1b6e6e8d439ee7d3f0f01a9a940e2d6c8437
Author: Li Li <ur...@apache.org>
AuthorDate: Wed Sep 28 15:52:13 2022 +0800

    Fixed token parameter passing
    
    Signed-off-by: Li Li <ur...@apache.org>
---
 site2/tools/build-site.sh        | 12 +++++-------
 site2/tools/docker-build-site.sh |  2 +-
 site2/tools/release-json-gen.sh  |  3 ++-
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/site2/tools/build-site.sh b/site2/tools/build-site.sh
index fdd1ab66199..f03b60def5a 100755
--- a/site2/tools/build-site.sh
+++ b/site2/tools/build-site.sh
@@ -18,19 +18,17 @@
 # under the License.
 #
 
-set -x
+set -x -e
 
-ROOT_DIR=$(git rev-parse --show-toplevel)
+GH_TOKEN=$1
 
-NEXT=$1
+ROOT_DIR=$(git rev-parse --show-toplevel)
 
-WEBSITE_DIR=${ROOT_DIR}/site2/website-$NEXT
+WEBSITE_DIR=${ROOT_DIR}/site2/website-next
 TOOLS_DIR=${ROOT_DIR}/site2/tools
 GEN_SITE_DIR=${ROOT_DIR}/generated-site
 VERSION=latest
 
-set -x -e
-
 export NODE_OPTIONS="--max-old-space-size=16000"
 "$TOOLS_DIR"/generate-api-docs.sh
 cd "$WEBSITE_DIR"
@@ -64,4 +62,4 @@ cp -R ./build/* "$CONTENT_DIR"
 cp -R "$WEBSITE_DIR"/static/swagger/* "$CONTENT_DIR"/swagger/
 
 # Generate document for release table
-"$TOOLS_DIR"/release-json-gen.sh "$WEBSITE_DIR"
+"$TOOLS_DIR"/release-json-gen.sh $GH_TOKEN "$WEBSITE_DIR"
diff --git a/site2/tools/docker-build-site.sh b/site2/tools/docker-build-site.sh
index b6f992b352c..19da289f1bf 100755
--- a/site2/tools/docker-build-site.sh
+++ b/site2/tools/docker-build-site.sh
@@ -47,6 +47,6 @@ DOCKER_CMD="docker run -i -e CI_USER=$CI_USER -e CI_GROUP=$CI_GROUP -v $HOME/.m2
 sed -i "s#$ROOT_DIR#/pulsar#g" $ROOT_DIR/distribution/server/target/classpath.txt
 sed -i "s#$HOME#/root#g" $ROOT_DIR/distribution/server/target/classpath.txt
 
-CMD="cd /pulsar && /pulsar/site2/tools/build-site.sh $@"
+CMD="cd /pulsar && /pulsar/site2/tools/build-site.sh $GH_TOKEN $@"
 echo "docker exec cmd: "$CMD
 $DOCKER_CMD bash -l -c "$CMD"
\ No newline at end of file
diff --git a/site2/tools/release-json-gen.sh b/site2/tools/release-json-gen.sh
index ce265982dec..b5eebc7ea2f 100755
--- a/site2/tools/release-json-gen.sh
+++ b/site2/tools/release-json-gen.sh
@@ -21,7 +21,8 @@
 set -x -e
 
 ROOT_DIR=$(git rev-parse --show-toplevel)
-WEBSITE=$1
+GH_TOKEN=$1
+WEBSITE=$2
 
 DATA=$WEBSITE/data
 OUTPUT_PULSAR=$DATA/release-pulsar.js