Skip to content

Commit 93ea016

Browse files
committed
Move .generated_docs to docs/ so docs OWNERS can review / approve
1 parent 30e8953 commit 93ea016

7 files changed

+16
-15
lines changed

.generated_files

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ path-prefix vendor/
2727
path-prefix api/swagger-spec/
2828
path-prefix pkg/generated/
2929

30-
paths-from-repo .generated_docs
30+
paths-from-repo docs/.generated_docs

.generated_docs docs/.generated_docs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.generated_docs
1+
docs/.generated_docs
22
docs/admin/federation-apiserver.md
33
docs/admin/federation-controller-manager.md
44
docs/admin/kube-apiserver.md

docs/OWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ approvers:
66
- brendandburns
77
- smarterclayton
88
- thockin
9+
- pwittrock

hack/generate-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ kube::util::gen-docs "${KUBE_TEMP}"
4444
kube::util::remove-gen-docs
4545

4646
# copy fresh docs into the repo.
47-
# the shopt is so that we get .generated_docs from the glob.
47+
# the shopt is so that we get docs/.generated_docs from the glob.
4848
shopt -s dotglob
4949
cp -af "${KUBE_TEMP}"/* "${KUBE_ROOT}"
5050
shopt -u dotglob

hack/lib/util.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -228,35 +228,35 @@ kube::util::gen-docs() {
228228

229229
# create the list of generated files
230230
pushd "${dest}" > /dev/null
231-
touch .generated_docs
232-
find . -type f | cut -sd / -f 2- | LC_ALL=C sort > .generated_docs
231+
touch docs/.generated_docs
232+
find . -type f | cut -sd / -f 2- | LC_ALL=C sort > docs/.generated_docs
233233
popd > /dev/null
234234
}
235235

236236
# Puts a placeholder for every generated doc. This makes the link checker work.
237237
kube::util::set-placeholder-gen-docs() {
238-
local list_file="${KUBE_ROOT}/.generated_docs"
238+
local list_file="${KUBE_ROOT}/docs/.generated_docs"
239239
if [ -e ${list_file} ]; then
240240
# remove all of the old docs; we don't want to check them in.
241241
while read file; do
242242
if [[ "${list_file}" != "${KUBE_ROOT}/${file}" ]]; then
243243
cp "${KUBE_ROOT}/hack/autogenerated_placeholder.txt" "${KUBE_ROOT}/${file}"
244244
fi
245245
done <"${list_file}"
246-
# The .generated_docs file lists itself, so we don't need to explicitly
246+
# The docs/.generated_docs file lists itself, so we don't need to explicitly
247247
# delete it.
248248
fi
249249
}
250250

251251
# Removes previously generated docs-- we don't want to check them in. $KUBE_ROOT
252252
# must be set.
253253
kube::util::remove-gen-docs() {
254-
if [ -e "${KUBE_ROOT}/.generated_docs" ]; then
254+
if [ -e "${KUBE_ROOT}/docs/.generated_docs" ]; then
255255
# remove all of the old docs; we don't want to check them in.
256256
while read file; do
257257
rm "${KUBE_ROOT}/${file}" 2>/dev/null || true
258-
done <"${KUBE_ROOT}/.generated_docs"
259-
# The .generated_docs file lists itself, so we don't need to explicitly
258+
done <"${KUBE_ROOT}/docs/.generated_docs"
259+
# The docs/.generated_docs file lists itself, so we don't need to explicitly
260260
# delete it.
261261
fi
262262
}

hack/update-generated-docs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ kube::util::gen-docs "${KUBE_TEMP}"
4444
kube::util::remove-gen-docs
4545

4646
# Copy fresh docs into the repo.
47-
# the shopt is so that we get .generated_docs from the glob.
47+
# the shopt is so that we get docs/.generated_docs from the glob.
4848
shopt -s dotglob
4949
cp -af "${KUBE_TEMP}"/* "${KUBE_ROOT}"
5050
shopt -u dotglob

hack/verify-generated-docs.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ kube::util::ensure-temp-dir
3737
kube::util::gen-docs "${KUBE_TEMP}"
3838

3939
# Verify the list matches the expected list (diff should be empty)
40-
if [[ "$(diff ${KUBE_ROOT}/.generated_docs ${KUBE_TEMP}/.generated_docs)" != "" ]]; then
40+
if [[ "$(diff ${KUBE_ROOT}/docs/.generated_docs ${KUBE_TEMP}/docs/.generated_docs)" != "" ]]; then
4141
echo "List of generated docs doesn't match a freshly built list. Please run hack/update-generated-docs.sh"
4242
exit 1
4343
fi
4444

4545
# Verify the files in the repo all contain the boilerplate instead of the actual
4646
# content.
4747
while read file; do
48-
# Ignore .generated_docs-- it should not have the boilerplate!
49-
[[ "${file}" == ".generated_docs" ]] && continue
48+
# Ignore docs/.generated_docs-- it should not have the boilerplate!
49+
[[ "${file}" == "docs/.generated_docs" ]] && continue
5050

5151
# Search for "hack/generate-docs.sh" as a proxy for the boilerplate content,
5252
# since the munger adds a bunch of other stuff.
@@ -55,4 +55,4 @@ while read file; do
5555
echo "Please run hack/update-generated-docs.sh"
5656
exit 1
5757
fi
58-
done <"${KUBE_ROOT}/.generated_docs"
58+
done <"${KUBE_ROOT}/docs/.generated_docs"

0 commit comments

Comments
 (0)