https://github.com/ray-project/ray
Raw File
Tip revision: 7d1a51e162e6d4ca77598e3d57add535a1cf6bb1 authored by khluu on 21 February 2024, 22:26:28 UTC
add test and fix order
Tip revision: 7d1a51e
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