https://github.com/ray-project/ray
Raw File
Tip revision: a81c41fc4f5d3db0938731453e4566a3293f2e10 authored by Lonnie Liu on 08 December 2023, 08:10:29 UTC
.
Tip revision: a81c41f
setup_hooks.sh
#!/bin/sh
set -eu

# This stops git rev-parse from failing if we run this from the .git directory
builtin cd "$(dirname "${BASH_SOURCE:-$0}")"

ROOT="$(git rev-parse --show-toplevel)"
builtin cd "${ROOT}"

# If we change the lint location we should modify the path of lint relative .git
RELATIVE_PATH="../../ci/lint"

ln -sf "${RELATIVE_PATH}/pre-push" "${ROOT}/.git/hooks/pre-push"
ln -sf "${RELATIVE_PATH}/prepare-commit-msg" "${ROOT}/.git/hooks/prepare-commit-msg"

back to top