From 4226cbd8020253b010fb44d395db12efe68e1272 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 21 Sep 2023 22:30:17 -0400 Subject: Rename BIZ_ROOT to CODEROOT BIZ_ROOT was too specific. CODEROOT allows for other (non-biz) projects to live in the root of the repo. I didn't want to call it GIT_ROOT because maybe someday I won't want to use git. But I'll never not use code. --- Biz/Ide/hooks/post-checkout | 4 ++-- Biz/Ide/hooks/post-merge | 2 +- Biz/Ide/hooks/pre-commit | 2 +- Biz/Ide/hooks/pre-push | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'Biz/Ide/hooks') diff --git a/Biz/Ide/hooks/post-checkout b/Biz/Ide/hooks/post-checkout index ef0cfa1..73488b0 100755 --- a/Biz/Ide/hooks/post-checkout +++ b/Biz/Ide/hooks/post-checkout @@ -1,13 +1,13 @@ #!/usr/bin/env bash set -e -mktags=${BIZ_ROOT:?}/Biz/Ide/mktags +mktags=${CODEROOT:?}/Biz/Ide/mktags old=$1 new=$2 # filter out only the changed haskell files changed=($(git diff --diff-filter=d --name-only $old $new -- '*.hs')) if [[ ! -r tags ]] || [[ ! -r TAGS ]] then - $mktags "$BIZ_ROOT"/**/* + $mktags "$CODEROOT"/**/* elif [[ ${#changed[@]} -gt 0 ]] then $mktags $changed diff --git a/Biz/Ide/hooks/post-merge b/Biz/Ide/hooks/post-merge index f0d59a9..c21211f 100755 --- a/Biz/Ide/hooks/post-merge +++ b/Biz/Ide/hooks/post-merge @@ -1,2 +1,2 @@ #!/usr/bin/env bash -exec ${BIZ_ROOT:?}/Biz/Ide/hooks/post-checkout 'HEAD@{1}' HEAD +exec ${CODEROOT:?}/Biz/Ide/hooks/post-checkout 'HEAD@{1}' HEAD diff --git a/Biz/Ide/hooks/pre-commit b/Biz/Ide/hooks/pre-commit index 065a0f6..2b4575c 100755 --- a/Biz/Ide/hooks/pre-commit +++ b/Biz/Ide/hooks/pre-commit @@ -7,7 +7,7 @@ changed=($(git diff-index --cached --name-only HEAD)) for ns in ${changed[@]} do - version=$(${BIZ_ROOT:?}/Biz/Ide/version $ns) + version=$(${CODEROOT:?}/Biz/Ide/version $ns) if (( $version == -1 )); then echo "info: version: $ns: deleted" elif (( $version < 1 )); then diff --git a/Biz/Ide/hooks/pre-push b/Biz/Ide/hooks/pre-push index baf7a13..0c313cb 100755 --- a/Biz/Ide/hooks/pre-push +++ b/Biz/Ide/hooks/pre-push @@ -30,7 +30,7 @@ fi fi ## - if lint "${BIZ_ROOT:?}"/**/* + if lint "${CODEROOT:?}"/**/* then lint_result="good" else @@ -38,7 +38,7 @@ exit 1 fi ## - if bild --test "${BIZ_ROOT:?}"/**/* + if bild --test "${CODEROOT:?}"/**/* then test_result="good" else -- cgit v1.2.3