summaryrefslogtreecommitdiff
path: root/Biz/Ide/hooks/pre-push.bash
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2024-04-01 15:19:49 -0400
committerBen Sima <ben@bsima.me>2024-04-01 15:19:49 -0400
commit2d40ec3a03f4684f6fabba7dee2981c992a13785 (patch)
tree1edc1522fd5eb8e6d20b1b4dbde89f3e49ad9e51 /Biz/Ide/hooks/pre-push.bash
parentdb373a8c727cad91d375b40a6c70b11ed73bdafb (diff)
Rename .bash files to .sh
I was already using .sh to refer to shell scripts. When I added .bash, I didn't realize that the linter was set to act on .sh files and not .bash files, so all of these bash scripts escaped the linter. This commit renames them to .sh, removes the .bash extension support from Biz.Namespace, and fixes all the reported shellcheck errors.
Diffstat (limited to 'Biz/Ide/hooks/pre-push.bash')
-rwxr-xr-xBiz/Ide/hooks/pre-push.bash55
1 files changed, 0 insertions, 55 deletions
diff --git a/Biz/Ide/hooks/pre-push.bash b/Biz/Ide/hooks/pre-push.bash
deleted file mode 100755
index 5abd3ee..0000000
--- a/Biz/Ide/hooks/pre-push.bash
+++ /dev/null
@@ -1,55 +0,0 @@
-#!/usr/bin/env bash
-#
-# A simple ci that saves its results in a git note, formatted according to
-# RFC-2822, more or less.
-#
-# To run this manually, exec the script. It will expect to read a line of
-# inputs, you can just enter 'HEAD' and it will
-#
-##
- set -uo pipefail
- [[ -n $(git status -s) ]] && { echo fail: dirty worktree; exit 1; }
-##
- at=$(date -R)
- user=$(git config --get user.name)
- mail=$(git config --get user.email)
-##
- commit=$(git notes --ref=ci show HEAD || true)
- if [[ -n "$commit" ]]
- then
- lint_ok=$()
- if grep -q "Lint-is: good" <<< $commit
- then
- exit 0
- fi
- if grep -q "Test-is: good" <<< $commit
- then
- exit 0
- fi
- fi
-##
- if lint "${CODEROOT:?}"/**/*
- then
- lint_result="good"
- else
- lint_result="fail"
- exit 1
- fi
-##
- if bild ${BILD_ARGS:-""} --test "${CODEROOT:?}"/**/*
- then
- test_result="good"
- else
- test_result="fail"
- exit 1
- fi
-##
- read -r -d '' note <<EOF
-Lint-is: $lint_result
-Test-is: $test_result
-Test-by: $user <$mail>
-Test-at: $at
-EOF
-##
- git notes --ref=ci append -m "$note"
-##