mirror of
https://github.com/kuhyx/utils.git
synced 2026-11-10 17:47:24 +01:00
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
scripts/check_no_gms_signin.sh fails when a pubspec.lock or android gradle file pulls google_sign_in / play-services-auth / googleid, or a built APK (--apk) carries GMS auth classes, and names google_account_token as the fix. install_repo_contract_gate.sh now installs its shim and an always-run hook in Flutter Android repos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWVQE5pYiASpRGgA3Kg
33 lines
1.3 KiB
Bash
Executable File
33 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# ============================================================================
|
|
# Install the repo-contract gate into a repo and bootstrap its CLAUDE.md
|
|
# `## Commands` section plus scripts/test_changed.sh.
|
|
#
|
|
# Run this on EVERY new repo, right after `git init`. Idempotent. Pieces:
|
|
# scripts/check_repo_contract.sh shim, pre-commit hook, CI workflow (skipped
|
|
# when the repo has .dep-freshness-no-workflow), Commands section. A website
|
|
# (Vite/Astro/index.html build, or [agent_ready] in repo-contract.toml) also
|
|
# gets the AgentReady gate: config table, shim, hook, agent-ready workflow.
|
|
# A Flutter app with android/ also gets the no-GMS-sign-in gate (shim + hook).
|
|
#
|
|
# Usage: scripts/install_repo_contract_gate.sh <repo> [--check] [--no-bootstrap]
|
|
# Exit: 0 contract satisfied | 1 violations left (e.g. <FILL IN>) | 2 not a git repo
|
|
# ============================================================================
|
|
|
|
set -euo pipefail
|
|
|
|
UTILS_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
readonly UTILS_ROOT
|
|
|
|
main() {
|
|
if [[ $# -lt 1 ]]; then
|
|
echo "Usage: $(basename "$0") <repo> [--check] [--no-bootstrap]" >&2
|
|
exit 1
|
|
fi
|
|
PYTHONPATH="$UTILS_ROOT${PYTHONPATH:+:$PYTHONPATH}" \
|
|
python3 -m repo_contract.install "$@"
|
|
}
|
|
|
|
main "$@"
|