Move .generated_docs to docs/ so docs OWNERS can review / approve

pull/6/head
Phillip Wittrock 2017-02-16 10:11:57 -08:00
parent 30e8953fad
commit 93ea01663f
7 changed files with 16 additions and 15 deletions

View File

@ -27,4 +27,4 @@ path-prefix vendor/
path-prefix api/swagger-spec/
path-prefix pkg/generated/
paths-from-repo .generated_docs
paths-from-repo docs/.generated_docs

View File

@ -1,4 +1,4 @@
.generated_docs
docs/.generated_docs
docs/admin/federation-apiserver.md
docs/admin/federation-controller-manager.md
docs/admin/kube-apiserver.md

View File

@ -6,3 +6,4 @@ approvers:
- brendandburns
- smarterclayton
- thockin
- pwittrock

View File

@ -44,7 +44,7 @@ kube::util::gen-docs "${KUBE_TEMP}"
kube::util::remove-gen-docs
# copy fresh docs into the repo.
# the shopt is so that we get .generated_docs from the glob.
# the shopt is so that we get docs/.generated_docs from the glob.
shopt -s dotglob
cp -af "${KUBE_TEMP}"/* "${KUBE_ROOT}"
shopt -u dotglob

View File

@ -228,14 +228,14 @@ kube::util::gen-docs() {
# create the list of generated files
pushd "${dest}" > /dev/null
touch .generated_docs
find . -type f | cut -sd / -f 2- | LC_ALL=C sort > .generated_docs
touch docs/.generated_docs
find . -type f | cut -sd / -f 2- | LC_ALL=C sort > docs/.generated_docs
popd > /dev/null
}
# Puts a placeholder for every generated doc. This makes the link checker work.
kube::util::set-placeholder-gen-docs() {
local list_file="${KUBE_ROOT}/.generated_docs"
local list_file="${KUBE_ROOT}/docs/.generated_docs"
if [ -e ${list_file} ]; then
# remove all of the old docs; we don't want to check them in.
while read file; do
@ -243,7 +243,7 @@ kube::util::set-placeholder-gen-docs() {
cp "${KUBE_ROOT}/hack/autogenerated_placeholder.txt" "${KUBE_ROOT}/${file}"
fi
done <"${list_file}"
# The .generated_docs file lists itself, so we don't need to explicitly
# The docs/.generated_docs file lists itself, so we don't need to explicitly
# delete it.
fi
}
@ -251,12 +251,12 @@ kube::util::set-placeholder-gen-docs() {
# Removes previously generated docs-- we don't want to check them in. $KUBE_ROOT
# must be set.
kube::util::remove-gen-docs() {
if [ -e "${KUBE_ROOT}/.generated_docs" ]; then
if [ -e "${KUBE_ROOT}/docs/.generated_docs" ]; then
# remove all of the old docs; we don't want to check them in.
while read file; do
rm "${KUBE_ROOT}/${file}" 2>/dev/null || true
done <"${KUBE_ROOT}/.generated_docs"
# The .generated_docs file lists itself, so we don't need to explicitly
done <"${KUBE_ROOT}/docs/.generated_docs"
# The docs/.generated_docs file lists itself, so we don't need to explicitly
# delete it.
fi
}

View File

@ -44,7 +44,7 @@ kube::util::gen-docs "${KUBE_TEMP}"
kube::util::remove-gen-docs
# Copy fresh docs into the repo.
# the shopt is so that we get .generated_docs from the glob.
# the shopt is so that we get docs/.generated_docs from the glob.
shopt -s dotglob
cp -af "${KUBE_TEMP}"/* "${KUBE_ROOT}"
shopt -u dotglob

View File

@ -37,7 +37,7 @@ kube::util::ensure-temp-dir
kube::util::gen-docs "${KUBE_TEMP}"
# Verify the list matches the expected list (diff should be empty)
if [[ "$(diff ${KUBE_ROOT}/.generated_docs ${KUBE_TEMP}/.generated_docs)" != "" ]]; then
if [[ "$(diff ${KUBE_ROOT}/docs/.generated_docs ${KUBE_TEMP}/docs/.generated_docs)" != "" ]]; then
echo "List of generated docs doesn't match a freshly built list. Please run hack/update-generated-docs.sh"
exit 1
fi
@ -45,8 +45,8 @@ fi
# Verify the files in the repo all contain the boilerplate instead of the actual
# content.
while read file; do
# Ignore .generated_docs-- it should not have the boilerplate!
[[ "${file}" == ".generated_docs" ]] && continue
# Ignore docs/.generated_docs-- it should not have the boilerplate!
[[ "${file}" == "docs/.generated_docs" ]] && continue
# Search for "hack/generate-docs.sh" as a proxy for the boilerplate content,
# since the munger adds a bunch of other stuff.
@ -55,4 +55,4 @@ while read file; do
echo "Please run hack/update-generated-docs.sh"
exit 1
fi
done <"${KUBE_ROOT}/.generated_docs"
done <"${KUBE_ROOT}/docs/.generated_docs"