The 23 wallet notes move to docs/retired/ with a banner; every link between notes is rewritten for the move and checked. The index lists them as one Retired paragraph, and seven kept notes carry a line on what changed. The README and CLAUDE.md describe a Giza with no wallet. brand-audit.sh loses its "bennu/ exception: every such tag was a wallet's, so one now is a wallet coming back. wallet-audit.sh --check, in check and in CI, fails on a retired kind in the app's code, a lightning-kmp import, a file named for a wallet's pieces, or sats in a string. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
65 lines
2.4 KiB
Bash
Executable File
65 lines
2.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Where the name Bennu may still appear in Giza: docs/giza-rebrand.md, Phase 6.
|
|
#
|
|
# docs/scripts/brand-audit.sh lists the lines that break the rule
|
|
# docs/scripts/brand-audit.sh --check and exits 1 if there are any
|
|
#
|
|
# The rule, in the parts that build or ship (composeApp, iosApp and the gradle scripts):
|
|
# Bennu may be named in a comment, and nowhere else. A comment can explain the fork.
|
|
# Anything else -- a string a person reads, a client tag, an identifier, a package, a
|
|
# derivation tag -- is a leftover.
|
|
#
|
|
# There used to be a second exception, for the twelve `bennu/` derivation tags, which are
|
|
# hash inputs Giza shared with Bennu. Every one of them was a wallet's, and they went with
|
|
# the wallets (docs/giza-wallet-removal.md). The tags that stay are `mantra/`. So a
|
|
# `bennu/` tag in the code now is a wallet coming back, and fails like any other leftover.
|
|
#
|
|
# Prose (README.md, CLAUDE.md and docs/) is not checked: it explains the fork, and docs/
|
|
# records decisions taken while the app was Bennu.
|
|
#
|
|
# Why it exists: a merge from Bennu (Phase 9) brings Bennu's new strings with it, and
|
|
# docs/scripts/giza-rename.sh renames code, not words. This is what fails the build when
|
|
# one of them would otherwise ship.
|
|
#
|
|
# Needs only bash and git, like m3-audit.sh, so the CI budgets job can run it.
|
|
|
|
set -uo pipefail
|
|
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../.." || exit 1
|
|
|
|
CHECK=0
|
|
[[ "${1:-}" == "--check" ]] && CHECK=1
|
|
|
|
violations=$(
|
|
git grep -niI 'bennu' -- \
|
|
composeApp iosApp settings.gradle.kts build.gradle.kts \
|
|
| awk '
|
|
{
|
|
# path:line:text -- the text may itself contain colons.
|
|
path = $0; sub(/:.*/, "", path)
|
|
text = $0; sub(/^[^:]*:[^:]*:/, "", text)
|
|
code = text; sub(/^[ \t]+/, "", code)
|
|
}
|
|
# Comments in Kotlin and Gradle scripts: //, /* and KDoc continuation lines.
|
|
path ~ /\.(kt|kts)$/ && (code ~ /^\/\// || code ~ /^\/\*/ || code ~ /^\*/) { next }
|
|
# Comments in YAML and shell.
|
|
path ~ /\.(yml|yaml|sh)$/ && code ~ /^#/ { next }
|
|
{ print }
|
|
'
|
|
)
|
|
|
|
count=0
|
|
[[ -n "$violations" ]] && count=$(printf '%s\n' "$violations" | wc -l)
|
|
|
|
echo "Bennu outside comments: $count"
|
|
if (( count > 0 )); then
|
|
printf '%s\n' "$violations" | sed 's/^/ /'
|
|
fi
|
|
|
|
if (( CHECK && count > 0 )); then
|
|
echo "Name it Giza. A bennu/ derivation tag is a wallet coming back: see docs/giza-wallet-removal.md." >&2
|
|
exit 1
|
|
fi
|
|
exit 0
|