Files
heartwood/scripts/just/check-keywords.sh
T
Lorenz Leutgeb aa177b0400 treewide: radicle.{xyz → dev,network}
We have moved to radicle.dev, so adjust the domain name in various
places.

Not changed:
 - COB type names
 - systemd secret identifiers
2026-04-27 18:34:30 +02:00

29 lines
924 B
Bash
Executable File

#! /usr/bin/env bash
set -e
echo "${CHECK}Checking for forbidden words in staged files...${NORMAL}"
# Get staged Rust files
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep '\.rs$' || true)
if [ -n "$STAGED_FILES" ]; then
if echo "$STAGED_FILES" | xargs rg --context=3 --fixed-strings 'radicle.dev'; then
exit 1
fi
if echo "$STAGED_FILES" | xargs rg --context=3 --fixed-strings 'radicle.xyz'; then
exit 1
fi
if echo "$STAGED_FILES" | xargs rg --context=3 --fixed-strings 'radicle.zulipchat.com'; then
exit 1
fi
# For `git2::` we need to exclude raw.rs
FILTERED_GIT2=$(echo "$STAGED_FILES" | grep '^crates/radicle/.*\.rs$' | grep -v 'crates/radicle/src/git/raw.rs' || true)
if [ -n "$FILTERED_GIT2" ]; then
if echo "$FILTERED_GIT2" | xargs rg --context=3 --fixed-strings 'git2::'; then
exit 1
fi
fi
fi