summaryrefslogtreecommitdiff
path: root/Biz/Ide/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'Biz/Ide/hooks')
-rwxr-xr-xBiz/Ide/hooks/commit-msg.sh (renamed from Biz/Ide/hooks/commit-msg.bash)0
-rwxr-xr-xBiz/Ide/hooks/post-applypatch.sh (renamed from Biz/Ide/hooks/post-applypatch.bash)0
-rwxr-xr-xBiz/Ide/hooks/post-checkout.sh (renamed from Biz/Ide/hooks/post-checkout.bash)6
-rwxr-xr-xBiz/Ide/hooks/post-commit.sh (renamed from Biz/Ide/hooks/post-commit.bash)0
-rwxr-xr-xBiz/Ide/hooks/post-merge.sh (renamed from Biz/Ide/hooks/post-merge.bash)2
-rwxr-xr-xBiz/Ide/hooks/post-rewrite.sh (renamed from Biz/Ide/hooks/post-rewrite.bash)0
-rwxr-xr-xBiz/Ide/hooks/pre-auto-gc.sh (renamed from Biz/Ide/hooks/pre-auto-gc.bash)0
-rwxr-xr-xBiz/Ide/hooks/pre-commit.sh (renamed from Biz/Ide/hooks/pre-commit.bash)6
-rwxr-xr-xBiz/Ide/hooks/pre-push.sh (renamed from Biz/Ide/hooks/pre-push.bash)7
-rwxr-xr-xBiz/Ide/hooks/reference-transaction.sh (renamed from Biz/Ide/hooks/reference-transaction.bash)0
10 files changed, 10 insertions, 11 deletions
diff --git a/Biz/Ide/hooks/commit-msg.bash b/Biz/Ide/hooks/commit-msg.sh
index 64e400d..64e400d 100755
--- a/Biz/Ide/hooks/commit-msg.bash
+++ b/Biz/Ide/hooks/commit-msg.sh
diff --git a/Biz/Ide/hooks/post-applypatch.bash b/Biz/Ide/hooks/post-applypatch.sh
index 5071dc5..5071dc5 100755
--- a/Biz/Ide/hooks/post-applypatch.bash
+++ b/Biz/Ide/hooks/post-applypatch.sh
diff --git a/Biz/Ide/hooks/post-checkout.bash b/Biz/Ide/hooks/post-checkout.sh
index 982cb4b..e4a0d67 100755
--- a/Biz/Ide/hooks/post-checkout.bash
+++ b/Biz/Ide/hooks/post-checkout.sh
@@ -1,16 +1,16 @@
#!/usr/bin/env bash
set -e
-mktags=${CODEROOT:?}/Biz/Ide/mktags
+mktags=${CODEROOT:?}/Biz/Ide/mktags.sh
old=$1
new=$2
# filter out only the changed haskell files
-changed=($(git diff --diff-filter=d --name-only $old $new -- '*.hs'))
+mapfile -t changed < <(git diff --diff-filter=d --name-only "$old" "$new" -- '*.hs')
if [[ ! -r tags ]] || [[ ! -r TAGS ]]
then
$mktags "$CODEROOT"/**/*
elif [[ ${#changed[@]} -gt 0 ]]
then
- $mktags $changed
+ $mktags "${changed[@]}"
fi
direnv reload
## START BRANCHLESS CONFIG
diff --git a/Biz/Ide/hooks/post-commit.bash b/Biz/Ide/hooks/post-commit.sh
index cd1f195..cd1f195 100755
--- a/Biz/Ide/hooks/post-commit.bash
+++ b/Biz/Ide/hooks/post-commit.sh
diff --git a/Biz/Ide/hooks/post-merge.bash b/Biz/Ide/hooks/post-merge.sh
index 94f0f60..d2cfa63 100755
--- a/Biz/Ide/hooks/post-merge.bash
+++ b/Biz/Ide/hooks/post-merge.sh
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
-exec ${CODEROOT:?}/Biz/Ide/hooks/post-checkout 'HEAD@{1}' HEAD
+"${CODEROOT:?}"/Biz/Ide/hooks/post-checkout 'HEAD@{1}' HEAD
## START BRANCHLESS CONFIG
git branchless hook post-merge "$@"
diff --git a/Biz/Ide/hooks/post-rewrite.bash b/Biz/Ide/hooks/post-rewrite.sh
index 8b3237a..8b3237a 100755
--- a/Biz/Ide/hooks/post-rewrite.bash
+++ b/Biz/Ide/hooks/post-rewrite.sh
diff --git a/Biz/Ide/hooks/pre-auto-gc.bash b/Biz/Ide/hooks/pre-auto-gc.sh
index c92a844..c92a844 100755
--- a/Biz/Ide/hooks/pre-auto-gc.bash
+++ b/Biz/Ide/hooks/pre-auto-gc.sh
diff --git a/Biz/Ide/hooks/pre-commit.bash b/Biz/Ide/hooks/pre-commit.sh
index 560eee7..e7c34ab 100755
--- a/Biz/Ide/hooks/pre-commit.bash
+++ b/Biz/Ide/hooks/pre-commit.sh
@@ -4,10 +4,10 @@
# - guard against lint errors
##
set -e
- changed=($(git diff-index --cached --name-only HEAD))
- for ns in ${changed[@]}
+ mapfile -t changed < <(git diff-index --cached --name-only HEAD)
+ for ns in "${changed[@]}"
do
- version=$(${CODEROOT:?}/Biz/Ide/version $ns)
+ version=$("${CODEROOT:?}"/Biz/Ide/version "$ns")
if [[ $version -eq -1 ]]; then
echo "info: version: $ns: deleted"
elif [[ $version -lt 1 ]]; then
diff --git a/Biz/Ide/hooks/pre-push.bash b/Biz/Ide/hooks/pre-push.sh
index 5abd3ee..16f11d1 100755
--- a/Biz/Ide/hooks/pre-push.bash
+++ b/Biz/Ide/hooks/pre-push.sh
@@ -17,12 +17,11 @@
commit=$(git notes --ref=ci show HEAD || true)
if [[ -n "$commit" ]]
then
- lint_ok=$()
- if grep -q "Lint-is: good" <<< $commit
+ if grep -q "Lint-is: good" <<< "$commit"
then
exit 0
fi
- if grep -q "Test-is: good" <<< $commit
+ if grep -q "Test-is: good" <<< "$commit"
then
exit 0
fi
@@ -36,7 +35,7 @@
exit 1
fi
##
- if bild ${BILD_ARGS:-""} --test "${CODEROOT:?}"/**/*
+ if bild "${BILD_ARGS:-""}" --test "${CODEROOT:?}"/**/*
then
test_result="good"
else
diff --git a/Biz/Ide/hooks/reference-transaction.bash b/Biz/Ide/hooks/reference-transaction.sh
index ea0cce6..ea0cce6 100755
--- a/Biz/Ide/hooks/reference-transaction.bash
+++ b/Biz/Ide/hooks/reference-transaction.sh