From d738e0655c23c4d59442a53a1692b76566cf834c Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 13 Dec 2022 15:52:42 +0800 Subject: [PATCH] [cleanup][misc] Remove website legacy tools Signed-off-by: tison --- site2/tools/doxygen-doc-gen.sh | 37 --------------------- site2/tools/generate-api-docs.sh | 39 ---------------------- site2/tools/javadoc-gen.sh | 55 -------------------------------- site2/website/api.sh | 31 ------------------ 4 files changed, 162 deletions(-) delete mode 100755 site2/tools/doxygen-doc-gen.sh delete mode 100755 site2/tools/generate-api-docs.sh delete mode 100755 site2/tools/javadoc-gen.sh delete mode 100755 site2/website/api.sh diff --git a/site2/tools/doxygen-doc-gen.sh b/site2/tools/doxygen-doc-gen.sh deleted file mode 100755 index 0dbd9d7cd452f..0000000000000 --- a/site2/tools/doxygen-doc-gen.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/usr/bin/env bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -set -x -e - -ROOT_DIR=$(git rev-parse --show-toplevel) -VERSION=$("$ROOT_DIR/src/get-project-version.py") -DOXYGEN=doxygen - -mkdir -p "$ROOT_DIR/generated-site/api/cpp" - -( - cd "$ROOT_DIR/pulsar-client-cpp" - "$DOXYGEN" Doxyfile -) - -# Latest docs in html dir -cp -r "$ROOT_DIR/target/doxygen/html" "$ROOT_DIR/generated-site/api/cpp/" -# Versioned docs in VERSION dir -mv "$ROOT_DIR/target/doxygen/html" "$ROOT_DIR/generated-site/api/cpp/$VERSION" diff --git a/site2/tools/generate-api-docs.sh b/site2/tools/generate-api-docs.sh deleted file mode 100755 index 75dfc8d784c10..0000000000000 --- a/site2/tools/generate-api-docs.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/usr/bin/env bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - -SCRIPT_DIR=`dirname "$0"` -cd $SCRIPT_DIR - -ROOT_DIR=$(git rev-parse --show-toplevel) -VERSION=`${ROOT_DIR}/src/get-project-version.py` - -set -x -e - -cd ${ROOT_DIR} -mkdir -p site2/website/static/swagger/${VERSION} -cp pulsar-broker/target/docs/*.json site2/website/static/swagger/${VERSION}/ - -SCRIPT_DIR=`dirname "$0"` - -cd $SCRIPT_DIR - -./doxygen-doc-gen.sh - -./javadoc-gen.sh diff --git a/site2/tools/javadoc-gen.sh b/site2/tools/javadoc-gen.sh deleted file mode 100755 index 69e517c0a5888..0000000000000 --- a/site2/tools/javadoc-gen.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. -# - - -ROOT_DIR=$(git rev-parse --show-toplevel) -VERSION=`${ROOT_DIR}/src/get-project-version.py` -DEST_DIR=$ROOT_DIR/generated-site - -( - cd $ROOT_DIR - - # Java client - mkdir -p $DEST_DIR/api/client/${VERSION} - mvn -pl pulsar-client-api javadoc:javadoc - cp -r pulsar-client-api/target/site/apidocs/* $DEST_DIR/api/client/${VERSION}/ - - - # Java admin - mkdir -p $DEST_DIR/api/admin/${VERSION} - mvn -pl pulsar-client-admin javadoc:javadoc - cp -r pulsar-client-admin/target/site/apidocs/* $DEST_DIR/api/admin/${VERSION}/ - - # Pulsar Functions Java SDK - mkdir -p $DEST_DIR/api/pulsar-functions/${VERSION} - cd pulsar-functions - mvn -pl api-java javadoc:javadoc - cd .. - cp -r pulsar-functions/api-java/target/site/apidocs/* $DEST_DIR/api/pulsar-functions/${VERSION}/ - - # Broker - mkdir -p $DEST_DIR/api/pulsar-broker/${VERSION} - mvn -pl pulsar-broker javadoc:javadoc - cp -r pulsar-broker/target/site/apidocs/* $DEST_DIR/api/pulsar-broker/${VERSION}/ - -) || true - -# The "|| true" is present here to keep this script from failing due to -# Javadoc errors diff --git a/site2/website/api.sh b/site2/website/api.sh deleted file mode 100755 index 66da4cd9879ad..0000000000000 --- a/site2/website/api.sh +++ /dev/null @@ -1,31 +0,0 @@ -#! /bin/sh -ROOT_DIR=$(git rev-parse --show-toplevel) -cd $ROOT_DIR/site2/ -mkdir -p .preview -cd .preview - -if [ -d "$ROOT_DIR/site2/.preview/pulsar-site" ]; then - cd pulsar-site - git clean -f - git checkout . - git pull origin main -else - git clone -b main --depth 1 https://github.com/apache/pulsar-site.git -fi - -cd $ROOT_DIR/site2/.preview/pulsar-site - -if [ $1"" == "admin" ]; then - sh site2/tools/pulsar-admin-md.sh $ROOT_DIR website -elif [ $1"" == "client" ]; then - sh site2/tools/pulsar-client-md.sh $ROOT_DIR website -elif [ $1"" == "perf" ]; then - sh site2/tools/pulsar-perf-md.sh $ROOT_DIR website -elif [ $1"" == "pulsar" ]; then - sh site2/tools/pulsar-md.sh $ROOT_DIR website -else - sh site2/tools/pulsar-perf-md.sh $ROOT_DIR website - sh site2/tools/pulsar-client-md.sh $ROOT_DIR website - sh site2/tools/pulsar-admin-md.sh $ROOT_DIR website - sh site2/tools/pulsar-md.sh $ROOT_DIR website -fi