github.com/kubeflow/training-operator@v1.7.0/hack/generate-apidoc.sh (about)

     1  #!/bin/bash
     2  
     3  # Copyright 2017 The Kubernetes Authors.
     4  #
     5  # Licensed under the Apache License, Version 2.0 (the "License");
     6  # you may not use this file except in compliance with the License.
     7  # You may obtain a copy of the License at
     8  #
     9  #     http://www.apache.org/licenses/LICENSE-2.0
    10  #
    11  # Unless required by applicable law or agreed to in writing, software
    12  # distributed under the License is distributed on an "AS IS" BASIS,
    13  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  # See the License for the specific language governing permissions and
    15  # limitations under the License.
    16  
    17  # This shell is used to auto generate some useful tools for k8s, such as lister,
    18  # informer, deepcopy, defaulter and so on.
    19  
    20  set -o errexit
    21  set -o nounset
    22  set -o pipefail
    23  
    24  SCRIPT_ROOT=$(dirname ${BASH_SOURCE})/..
    25  
    26  cd ${SCRIPT_ROOT}
    27  
    28  CRD_REF_GEN_VERSION=v0.0.8
    29  go install github.com/elastic/crd-ref-docs@${CRD_REF_GEN_VERSION}
    30  
    31  crd-ref-docs --log-level DEBUG\
    32      --source-path ./pkg/apis/kubeflow.org/v1 \
    33  		--config ./docs/api/autogen/config.yaml \
    34  		--templates-dir ./docs/api/autogen/templates \
    35  		--output-path ./docs/api/kubeflow.org_v1_generated.asciidoc \
    36  		--max-depth 30
    37  
    38  cd - > /dev/null