Files
cloudflared/scripts/install-git-hooks
T
olb042 363d6014f6
Validate manifests / validate (push) Failing after 12s
Initial cloudflared gitops app
2026-04-20 01:08:24 +01:00

17 lines
344 B
Bash
Executable File

#!/usr/bin/env zsh
set -eu
repo_root=$(git rev-parse --show-toplevel)
hook_path="${repo_root}/.git/hooks/pre-commit"
target="${repo_root}/scripts/git-hooks/pre-commit"
mkdir -p "${repo_root}/.git/hooks"
cat > "${hook_path}" <<EOF
#!/usr/bin/env zsh
exec "${target}" "\$@"
EOF
chmod +x "${hook_path}"
echo "Installed git hook: ${hook_path}"