chore: remove obsolete prepare-commit-msg script
This commit is contained in:
parent
a47bbf747d
commit
264fd2b987
1 changed files with 0 additions and 28 deletions
|
|
@ -1,28 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
set -eo pipefail
|
||||
|
||||
# exit on existing commit message
|
||||
[[ -z "$2" ]] || exit 0
|
||||
|
||||
# remove last line "$n files changed [...]"
|
||||
diff=$(git diff --staged --stat | grep -v '.*.expected.out' | head -n -1)
|
||||
# take file with most changes
|
||||
file=$(echo "$diff" | sort -n -k 3 | tail -n 1)
|
||||
# extract filename
|
||||
file=$(echo "$file" | cut -f 2 -d' ')
|
||||
file="${file#'src/'}"
|
||||
file="${file%.(cpp|h|md|lean)}"
|
||||
case $file in
|
||||
tests/*)
|
||||
type=test
|
||||
;;
|
||||
script/*)
|
||||
type=chore
|
||||
;;
|
||||
*)
|
||||
type=feat
|
||||
;;
|
||||
esac
|
||||
orig=$(cat "$1")
|
||||
echo "$type($file):" > $1
|
||||
echo "$orig" >> $1
|
||||
Loading…
Add table
Reference in a new issue