浏览代码

Add a script to install commit git hooks

jherve 1 年之前
父节点
当前提交
d120dfd089
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      install-git-hooks.sh

+ 9 - 0
install-git-hooks.sh

@@ -0,0 +1,9 @@
+#!/bin/bash
+set -eu
+
+PRE_COMMIT=.git/hooks/pre-commit
+
+cat <<-EOF > ${PRE_COMMIT}
+	rye fmt --check
+EOF
+chmod +x ${PRE_COMMIT}