https://github.com/ray-project/ray
Raw File
Tip revision: 40d0c1cdc5b26b09720eb6d20b6f73a6cad742a6 authored by Lonnie Liu on 14 February 2024, 06:18:27 UTC
.
Tip revision: 40d0c1c
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