forked from kubernetes/kubernetes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto generated docs are **NO LONGER CHECKED IN**, only placeholders. To generate them, e.g. before exporting docs, run hack/generate-docs.sh. hack/verify-generated-docs.sh ensures that generated docs are merely the placeholder text. hack/update-generated-docs.sh puts the placeholder text in the proper places. The old munge behavior is moved into hack/{update|verify}-munge-docs.sh.
- Loading branch information
Showing
8 changed files
with
244 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
This file is autogenerated, but we've stopped checking such files into the | ||
repository to reduce the need for rebases. Please run hack/generate-docs.sh to | ||
populate this file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2014 The Kubernetes Authors All rights reserved. | ||
# | ||
# Licensed 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. | ||
|
||
# This file is not intended to be run automatically. It is meant to be run | ||
# immediately before exporting docs. We do not want to check these documents in | ||
# by default. | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. | ||
source "${KUBE_ROOT}/hack/lib/init.sh" | ||
|
||
kube::golang::setup_env | ||
|
||
"${KUBE_ROOT}/hack/build-go.sh" \ | ||
cmd/gendocs \ | ||
cmd/genkubedocs \ | ||
cmd/genman \ | ||
cmd/genyaml \ | ||
federation/cmd/genfeddocs | ||
|
||
kube::util::ensure-temp-dir | ||
|
||
kube::util::gen-docs "${KUBE_TEMP}" | ||
|
||
# remove all of the old docs | ||
kube::util::remove-gen-docs | ||
|
||
# Copy fresh docs into the repo. | ||
# the shopt is so that we get .generated_docs from the glob. | ||
shopt -s dotglob | ||
cp -af "${KUBE_TEMP}"/* "${KUBE_ROOT}" | ||
shopt -u dotglob | ||
|
||
echo "Generated docs have been placed in the repository tree. Running hack/update-munge-docs.sh." | ||
|
||
"${KUBE_ROOT}/hack/update-munge-docs.sh" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2014 The Kubernetes Authors All rights reserved. | ||
# | ||
# Licensed 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 -o errexit | ||
set -o nounset | ||
set -o pipefail | ||
|
||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/.. | ||
source "${KUBE_ROOT}/hack/lib/init.sh" | ||
|
||
kube::golang::setup_env | ||
|
||
"${KUBE_ROOT}/hack/build-go.sh" \ | ||
cmd/mungedocs | ||
|
||
kube::util::ensure-temp-dir | ||
|
||
kube::util::gen-analytics "${KUBE_ROOT}" | ||
|
||
mungedocs=$(kube::util::find-binary "mungedocs") | ||
"${mungedocs}" "--upstream=${KUBE_GIT_UPSTREAM}" "--root-dir=${KUBE_ROOT}/docs/" && ret=0 || ret=$? | ||
if [[ $ret -eq 1 ]]; then | ||
echo "${KUBE_ROOT}/docs/ requires manual changes. See preceding errors." | ||
exit 1 | ||
elif [[ $ret -gt 1 ]]; then | ||
echo "Error running mungedocs." | ||
exit 1 | ||
fi | ||
|
||
"${mungedocs}" "--upstream=${KUBE_GIT_UPSTREAM}" "--root-dir=${KUBE_ROOT}/examples/" && ret=0 || ret=$? | ||
if [[ $ret -eq 1 ]]; then | ||
echo "${KUBE_ROOT}/examples/ requires manual changes. See preceding errors." | ||
exit 1 | ||
elif [[ $ret -gt 1 ]]; then | ||
echo "Error running mungedocs." | ||
exit 1 | ||
fi | ||
|
||
"${mungedocs}" "--upstream=${KUBE_GIT_UPSTREAM}" \ | ||
"--skip-munges=unversioned-warning,analytics" \ | ||
"--norecurse" \ | ||
"--root-dir=${KUBE_ROOT}/" && ret=0 || ret=$? | ||
if [[ $ret -eq 1 ]]; then | ||
echo "${KUBE_ROOT}/ requires manual changes. See preceding errors." | ||
exit 1 | ||
elif [[ $ret -gt 1 ]]; then | ||
echo "Error running mungedocs." | ||
exit 1 | ||
fi | ||
|
||
# ex: ts=2 sw=2 et filetype=sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.