panda-rpki/scripts/ci/check_public_tree.sh
yuyr 2a0b5067bd
Some checks failed
ci / public-tree (push) Has been cancelled
ci / docs (push) Has been cancelled
ci / rust (push) Has been cancelled
ci / docker-runtime (push) Has been cancelled
20260902 完成公开树清理与热点拆分
2026-09-02 11:48:36 +08:00

31 lines
807 B
Bash

#!/usr/bin/env bash
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
cd "$REPO_ROOT"
readonly PATTERN='git\.nasp\.fit|specs/develop|dev_1\.0\.0_yuyr|private[[:space:]]+(staging|repository)|remote[- ]?(231|211)|Feature #[0-9]{3}|#[0-9]{3}[[:space:]]+M[0-9]+'
readonly -a PUBLIC_TEXT_PATHS=(
README.md
CONTRIBUTING.md
SECURITY.md
docs
docker
deploy
scripts
tests/compat
fixtures
crates/panda-rpki-validator/src
crates/panda-rpki-validator/tests/fixtures/ta_constraints
)
if matches="$(rg -n -I -g '!scripts/ci/check_public_tree.sh' -e "$PATTERN" "${PUBLIC_TEXT_PATHS[@]}")"; then
echo "public-tree check found internal-history wording:" >&2
echo "$matches" >&2
exit 1
fi
echo "public-tree check passed"