diff options
Diffstat (limited to 'Biz/Ide/hooks')
-rwxr-xr-x | Biz/Ide/hooks/commit-msg | 7 | ||||
-rwxr-xr-x | Biz/Ide/hooks/post-applypatch | 6 | ||||
-rwxr-xr-x | Biz/Ide/hooks/post-checkout | 20 | ||||
-rwxr-xr-x | Biz/Ide/hooks/post-commit | 6 | ||||
-rwxr-xr-x | Biz/Ide/hooks/post-merge | 6 | ||||
-rwxr-xr-x | Biz/Ide/hooks/post-rewrite | 6 | ||||
-rwxr-xr-x | Biz/Ide/hooks/pre-auto-gc | 6 | ||||
-rwxr-xr-x | Biz/Ide/hooks/pre-commit | 21 | ||||
-rwxr-xr-x | Biz/Ide/hooks/pre-push | 22 | ||||
-rwxr-xr-x | Biz/Ide/hooks/reference-transaction | 12 |
10 files changed, 0 insertions, 112 deletions
diff --git a/Biz/Ide/hooks/commit-msg b/Biz/Ide/hooks/commit-msg deleted file mode 100755 index e07d1f4..0000000 --- a/Biz/Ide/hooks/commit-msg +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash -if ! gitlint --ignore-stdin --staged --msg-filename "$1" run-hook; then - backup="$CODEROOT"/.git/COMMIT_EDITMSG.backup - cp "$CODEROOT"/.git/COMMIT_EDITMSG "$backup" - echo "error: gitlint failed, saved your commit msg as $backup" - exit 1 -fi diff --git a/Biz/Ide/hooks/post-applypatch b/Biz/Ide/hooks/post-applypatch deleted file mode 100755 index 5071dc5..0000000 --- a/Biz/Ide/hooks/post-applypatch +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -## START BRANCHLESS CONFIG - -git branchless hook post-applypatch "$@" - -## END BRANCHLESS CONFIG diff --git a/Biz/Ide/hooks/post-checkout b/Biz/Ide/hooks/post-checkout deleted file mode 100755 index 4f58c74..0000000 --- a/Biz/Ide/hooks/post-checkout +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash -set -e -function MakeTags { - ${CODEROOT:?}/Biz/Ide/MakeTags.py -} -old=$1 -new=$2 -# filter out only the changed haskell files -mapfile -t changed < <(git diff --diff-filter=d --name-only "$old" "$new" -- '*.hs') -if [[ ! -r tags ]] || [[ ! -r TAGS ]] -then - MakeTags "$CODEROOT"/**/* -elif [[ ${#changed[@]} -gt 0 ]] -then - MakeTags "${changed[@]}" -fi -## START BRANCHLESS CONFIG - -git branchless hook post-checkout "$@" -## END BRANCHLESS CONFIG diff --git a/Biz/Ide/hooks/post-commit b/Biz/Ide/hooks/post-commit deleted file mode 100755 index cd1f195..0000000 --- a/Biz/Ide/hooks/post-commit +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -## START BRANCHLESS CONFIG - -git branchless hook post-commit "$@" - -## END BRANCHLESS CONFIG diff --git a/Biz/Ide/hooks/post-merge b/Biz/Ide/hooks/post-merge deleted file mode 100755 index d2cfa63..0000000 --- a/Biz/Ide/hooks/post-merge +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -"${CODEROOT:?}"/Biz/Ide/hooks/post-checkout 'HEAD@{1}' HEAD -## START BRANCHLESS CONFIG - -git branchless hook post-merge "$@" -## END BRANCHLESS CONFIG diff --git a/Biz/Ide/hooks/post-rewrite b/Biz/Ide/hooks/post-rewrite deleted file mode 100755 index 8b3237a..0000000 --- a/Biz/Ide/hooks/post-rewrite +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -## START BRANCHLESS CONFIG - -git branchless hook post-rewrite "$@" - -## END BRANCHLESS CONFIG diff --git a/Biz/Ide/hooks/pre-auto-gc b/Biz/Ide/hooks/pre-auto-gc deleted file mode 100755 index c92a844..0000000 --- a/Biz/Ide/hooks/pre-auto-gc +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -## START BRANCHLESS CONFIG - -git branchless hook pre-auto-gc "$@" - -## END BRANCHLESS CONFIG diff --git a/Biz/Ide/hooks/pre-commit b/Biz/Ide/hooks/pre-commit deleted file mode 100755 index b0f204a..0000000 --- a/Biz/Ide/hooks/pre-commit +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash -# -# - prevent frozen code from being checked in -# - guard against lint errors -## - set -e - mapfile -t changed < <(git diff-index --cached --name-only HEAD) - for ns in "${changed[@]}" - do - version=$("${CODEROOT:?}"/Biz/Ide/version.sh "$ns") - if [[ $version -eq -1 ]]; then - echo "info: version: $ns: deleted" - elif [[ $version -lt 1 ]]; then - echo "fail: version: $ns: $version" - exit 1 - else - echo "info: version: $ns: $version" - fi - done - lint "${changed[@]}" -## diff --git a/Biz/Ide/hooks/pre-push b/Biz/Ide/hooks/pre-push deleted file mode 100755 index 00110bd..0000000 --- a/Biz/Ide/hooks/pre-push +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -remote="$1" -z40=0000000000000000000000000000000000000000 -IFS=" " -while read local_ref local_sha remote_ref remote_sha -do - if [ "$local_sha" = $z40 ] - then - # delete, do nothing - continue - elif [ "$remote_sha" = $z40 ] - then - # new branch, test all commits since ci was implemented - range="11d95581fb178a5d21e88dfd8030a61886cc2519..$local_sha" - else - range="$remote_sha..$local_sha" - fi -done -gitlint --commits "$range" lint -git test run --command ci "$range" -git push "$remote" refs/notes/ci --no-verify diff --git a/Biz/Ide/hooks/reference-transaction b/Biz/Ide/hooks/reference-transaction deleted file mode 100755 index ea0cce6..0000000 --- a/Biz/Ide/hooks/reference-transaction +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh -## START BRANCHLESS CONFIG - -# Avoid canceling the reference transaction in the case that `branchless` fails -# for whatever reason. -git branchless hook reference-transaction "$@" || ( -echo 'branchless: Failed to process reference transaction!' -echo 'branchless: Some events (e.g. branch updates) may have been lost.' -echo 'branchless: This is a bug. Please report it.' -) - -## END BRANCHLESS CONFIG |