This repository has been archived on 2026-07-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
authentik/scripts/install-git-hooks
T
olb042 c85556e327
Validate manifests / validate (push) Failing after 8s
Initial authentik gitops app
2026-04-20 01:03:25 +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}"