Sfoglia il codice sorgente

Add a script to install commit git hooks

jherve 1 anno fa
parent
commit
d120dfd089
1 ha cambiato i file con 9 aggiunte e 0 eliminazioni
  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}