mirror of https://github.com/istio/istio.io.git
Cleanup doc-owners script and add to make gen (#7747)
* cleanup doc-owners script and add to make gen * pushd/popd
This commit is contained in:
parent
10e02ed2a1
commit
2b05bafb02
|
@ -74,7 +74,10 @@ site:
|
||||||
snips:
|
snips:
|
||||||
@scripts/gen_snips.sh
|
@scripts/gen_snips.sh
|
||||||
|
|
||||||
gen: snips tidy-go
|
doc-owners:
|
||||||
|
@scripts/doc_owners.sh
|
||||||
|
|
||||||
|
gen: snips doc-owners tidy-go
|
||||||
|
|
||||||
gen-check: gen check-clean-repo
|
gen-check: gen check-clean-repo
|
||||||
|
|
||||||
|
|
|
@ -16,52 +16,25 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
WORKGROUPS="istio/wg-docs-maintainers istio/wg-environments-maintainers istio/wg-networking-maintainers istio/wg-policies-and-telemetry-maintainers istio/wg-security-maintainers istio/wg-user-experience-maintainers"
|
||||||
|
|
||||||
owners_listing() {
|
owners_listing() {
|
||||||
echo "<!-- WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. UPDATE THE OWNER ATTRIBUTE IN THE DOCUMENT FILES, INSTEAD -->"
|
echo "<!-- WARNING: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT. UPDATE THE OWNER ATTRIBUTE IN THE DOCUMENT FILES, INSTEAD -->"
|
||||||
echo "# Istio.io Document Owners"
|
echo "# Istio.io Document Owners"
|
||||||
echo ""
|
echo ""
|
||||||
echo "There are $(find docs -name '*.md' -exec grep -q '^owner: istio/wg-' {} \; -print | wc -l) owned istio.io docs."
|
echo "There are $(find docs -name '*.md' -exec grep -q '^owner: istio/wg-' {} \; -print | wc -l) owned istio.io docs."
|
||||||
echo ""
|
|
||||||
echo "## istio/wg-docs-maintainers: \
|
|
||||||
$(find docs -name '*.md' -exec grep -q '^owner: istio/wg-docs-maintainers' {} \; -print | wc -l) docs"
|
|
||||||
echo ""
|
|
||||||
find docs -name '*.md' -exec grep -q '^owner: istio/wg-docs-maintainers' {} \; -print | sort
|
|
||||||
|
|
||||||
|
for wg in $WORKGROUPS; do
|
||||||
echo ""
|
echo ""
|
||||||
echo "## istio/wg-environments-maintainers: \
|
list=$(find docs -name '*.md' -exec grep -q "^owner: $wg" {} \; -print | sort)
|
||||||
$(find docs -name '*.md' -exec grep -q '^owner: istio/wg-environments-maintainers' {} \; -print | wc -l) docs"
|
echo "## $wg: $(wc -l <<<"$list") docs"
|
||||||
echo ""
|
echo ""
|
||||||
find docs -name '*.md' -exec grep -q '^owner: istio/wg-environments-maintainers' {} \; -print | sort
|
echo "$list"
|
||||||
|
done
|
||||||
echo ""
|
|
||||||
echo "## istio/wg-networking-maintainers: \
|
|
||||||
$(find docs -name '*.md' -exec grep -q '^owner: istio/wg-networking-maintainers' {} \; -print | wc -l) docs"
|
|
||||||
echo ""
|
|
||||||
find docs -name '*.md' -exec grep -q '^owner: istio/wg-networking-maintainers' {} \; -print | sort
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "## istio/wg-policies-and-telemetry-maintainers: \
|
|
||||||
$(find docs -name '*.md' -exec grep -q '^owner: istio/wg-policies-and-telemetry-maintainers' {} \; -print | wc -l) docs"
|
|
||||||
echo ""
|
|
||||||
find docs -name '*.md' -exec grep -q '^owner: istio/wg-policies-and-telemetry-maintainers' {} \; -print | sort
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "## istio/wg-security-maintainers: \
|
|
||||||
$(find docs -name '*.md' -exec grep -q '^owner: istio/wg-security-maintainers' {} \; -print | wc -l) docs"
|
|
||||||
echo ""
|
|
||||||
find docs -name '*.md' -exec grep -q '^owner: istio/wg-security-maintainers' {} \; -print | sort
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "## istio/wg-user-experience-maintainers: \
|
|
||||||
$(find docs -name '*.md' -exec grep -q '^owner: istio/wg-user-experience-maintainers' {} \; -print | wc -l) docs"
|
|
||||||
echo ""
|
|
||||||
find docs -name '*.md' -exec grep -q '^owner: istio/wg-user-experience-maintainers' {} \; -print | sort
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pushd content/en
|
pushd content/en >/dev/null
|
||||||
|
|
||||||
owners_listing > ../../DOC_OWNERS.md
|
owners_listing | sed -e 's|^docs/\(.*\)/index.md|- [docs/\1/index.md](https://preliminary.istio.io/latest/docs/\1)|' >../../DOC_OWNERS.md
|
||||||
|
|
||||||
sed -i '' -e 's|^docs/\(.*\)/index.md|- [docs/\1/index.md](https://preliminary.istio.io/latest/docs/\1)|' ../../DOC_OWNERS.md
|
popd >/dev/null
|
||||||
|
|
||||||
popd
|
|
||||||
|
|
Loading…
Reference in New Issue