docs: streamline README and split detailed guides
hermetic-ci / test (push) Canceled after 0s

This commit is contained in:
proxyctl coordinator
2026-08-30 11:35:52 +08:00
parent 2786b03b96
commit 416425a9bf
5 changed files with 248 additions and 105 deletions
+32 -17
View File
@@ -2,22 +2,37 @@
set -eu
repo=$(CDPATH= cd -- "$(dirname "$0")/.." && pwd)
readme="$repo/README.md"
test -s "$readme"
for text in \
'## Install' 'go install ./cmd/proxyctl' '## First use and Profiles' \
'## Shell integration' 'Shell' 'APT' 'Docker daemon' \
'Docker containers/builds' 'GNOME' '## Target states' 'Enabled' \
'Disabled' 'External' 'Drifted' '## Permissions, sudo, and restarts' \
'proxyctl doctor' 'proxyctl reset' 'proxyctl shell uninstall' \
'no telemetry' 'automatic update checks' 'proxy-connectivity tests' \
'does **not** manage or supervise proxy processes' 'Support is limited'
do
grep -Fq "$text" "$readme" || {
echo "README is missing required documentation: $text" >&2
exit 1
}
done
require_text() {
file=$1
shift
test -s "$file"
for text
do
grep -Fq "$text" "$file" || {
echo "$file is missing required documentation: $text" >&2
exit 1
}
done
}
printf 'README documentation contract passed\n'
require_text "$repo/README.md" \
'## Install' 'go install ./cmd/proxyctl' '## Quick start' \
'## Shell integration' 'proxyctl doctor' 'proxyctl reset' \
'no telemetry' 'docs/user-guide.md' 'docs/security.md' 'docs/development.md'
require_text "$repo/docs/user-guide.md" \
'## Profiles' 'Protocol Probe' '## Target states' 'Enabled' 'Disabled' \
'External' 'Drifted' 'Shell' 'APT' 'Docker daemon' \
'Docker containers/builds' 'GNOME' 'NO_COLOR'
require_text "$repo/docs/security.md" \
'proxyctl never starts `sudo`' 'Configuration recovery' \
'no automatic update checks' 'does **not** manage or supervise proxy processes' \
'Support is limited'
require_text "$repo/docs/development.md" \
'go test ./...' 'go vet ./...' 'test-hermetic.sh' \
'test-release.sh' 'verify-clean-machine.sh' 'SHA256SUMS'
printf 'documentation contract passed\n'