Use fork of lein-githooks with fixes for shell characters
This commit is contained in:
parent
3cf601bf18
commit
60c122b257
3 changed files with 8 additions and 12 deletions
|
|
@ -12,11 +12,16 @@
|
||||||
:aliases {"test" ["run" "-m" "kaocha.runner"]
|
:aliases {"test" ["run" "-m" "kaocha.runner"]
|
||||||
"cljstyle" ["run" "-m" "cljstyle.main"]}
|
"cljstyle" ["run" "-m" "cljstyle.main"]}
|
||||||
|
|
||||||
|
:plugins [[jainsahab/lein-githooks "1.0.0"]]
|
||||||
|
|
||||||
:profiles {:dev {:dependencies [[org.testcontainers/postgresql "1.14.3"]
|
:profiles {:dev {:dependencies [[org.testcontainers/postgresql "1.14.3"]
|
||||||
[lambdaisland/kaocha-cloverage "1.0-45"]
|
[lambdaisland/kaocha-cloverage "1.0-45"]
|
||||||
[lambdaisland/kaocha "1.0.641"]
|
[lambdaisland/kaocha "1.0.641"]
|
||||||
[lambdaisland/kaocha-junit-xml "0.0.76"]
|
[lambdaisland/kaocha-junit-xml "0.0.76"]
|
||||||
[mvxcvi/cljstyle "0.13.0" :exclusions [org.clojure/clojure]]]}}
|
[mvxcvi/cljstyle "0.13.0" :exclusions [org.clojure/clojure]]]
|
||||||
|
:githooks {:auto-install true
|
||||||
|
:ci-env-variable "CI"
|
||||||
|
:pre-commit ["script/pre-commit"]}}}
|
||||||
|
|
||||||
:target-path "target/%s")
|
:target-path "target/%s")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
||||||
|
|
||||||
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
|
FILES=$(git diff --cached --name-only --diff-filter=ACMR | sed 's| |\\ |g')
|
||||||
|
|
||||||
if [[ -z "$FILES" ]]; then
|
if [[ -z "$FILES" ]]; then
|
||||||
|
|
|
||||||
11
script/setup
11
script/setup
|
|
@ -1,11 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
cd "$(dirname "${BASH_SOURCE[0]}")/.."
|
|
||||||
|
|
||||||
echo "Installing pre-commit hook..."
|
|
||||||
mkdir -p .git/hooks
|
|
||||||
cp script/pre-commit .git/hooks/pre-commit
|
|
||||||
|
|
||||||
echo "Done!"
|
|
||||||
Loading…
Reference in a new issue