Public release release-be1f654ae8de
Source commit: be1f654ae8de7d5eeb2005b4e1a05bf1ebf3124f Public tree identity: sha256:ab53679496be4be7d1e02bc00723072774d1a3f87e10cc56558a752f28f6abb1
This commit is contained in:
commit
a6ca9e26dd
210 changed files with 78671 additions and 0 deletions
39
scripts/check-old-name.sh
Executable file
39
scripts/check-old-name.sh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
cd "$repo_root"
|
||||
|
||||
legacy_lower="$(printf '%s%s' 'disa' 'smer')"
|
||||
legacy_title="$(printf '%s%s' 'Disa' 'smer')"
|
||||
legacy_upper="$(printf '%s%s' 'DISA' 'SMER')"
|
||||
pattern="${legacy_lower}|${legacy_title}|${legacy_upper}"
|
||||
|
||||
allowed_content='^\./scripts/migrate-clusterflux-state\.sh:'
|
||||
matches="$(
|
||||
rg -n --hidden \
|
||||
--glob '!**/.git/**' \
|
||||
--glob '!**/target/**' \
|
||||
--glob '!**/node_modules/**' \
|
||||
--glob '!**/vendor/**' \
|
||||
--glob '!**/.direnv/**' \
|
||||
--glob '!**/.cache/**' \
|
||||
--glob '!**/dist/**' \
|
||||
--glob '!**/out/**' \
|
||||
"$pattern" . 2>/dev/null | rg -v "$allowed_content" || true
|
||||
)"
|
||||
|
||||
paths="$(
|
||||
find . \
|
||||
\( -type d \( -name .git -o -name target -o -name node_modules -o -name vendor -o -name .direnv -o -name .cache -o -name dist -o -name out \) -prune \) -o \
|
||||
-iname "*${legacy_lower}*" -print | sort || true
|
||||
)"
|
||||
|
||||
if [[ -n "$matches" || -n "$paths" ]]; then
|
||||
[[ -z "$matches" ]] || printf '%s\n' "$matches" >&2
|
||||
[[ -z "$paths" ]] || printf '%s\n' "$paths" >&2
|
||||
printf 'unexpected legacy product name remains\n' >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf 'old-name guard passed\n'
|
||||
Loading…
Add table
Add a link
Reference in a new issue