mirror of
git://f0xx.org/android_cast
synced 2026-07-29 04:38:53 +03:00
BE sync
This commit is contained in:
34
scripts/verify-gitignore.sh
Executable file
34
scripts/verify-gitignore.sh
Executable file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env bash
|
||||
# Quick check that paths required for ./rebuild.sh are not gitignored.
|
||||
set -euo pipefail
|
||||
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
cd "$ROOT"
|
||||
|
||||
required=(
|
||||
gradle/wrapper/gradle-wrapper.jar
|
||||
gradle/wrapper/gradle-wrapper.properties
|
||||
gradle/wireguard-tunnel/build.gradle
|
||||
gradlew
|
||||
third-party/README.md
|
||||
)
|
||||
|
||||
fail=0
|
||||
for path in "${required[@]}"; do
|
||||
if [[ ! -e "$path" ]]; then
|
||||
echo "MISSING on disk: $path" >&2
|
||||
fail=1
|
||||
continue
|
||||
fi
|
||||
if git check-ignore -q "$path" 2>/dev/null; then
|
||||
echo "GITIGNORE BLOCKS: $path" >&2
|
||||
fail=1
|
||||
else
|
||||
echo "OK: $path"
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ "$fail" -ne 0 ]]; then
|
||||
echo "fix .gitignore — see header comments in .gitignore" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "verify-gitignore: all required paths visible to git"
|
||||
Reference in New Issue
Block a user