Skip to content

Commit

Permalink
Merge pull request #45 from passageidentity/remove-husky
Browse files Browse the repository at this point in the history
Remove unwanted husky files
  • Loading branch information
rickycpadilla authored Oct 30, 2024
2 parents 24d4b02 + d8a5209 commit d2dca9a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 174 deletions.
57 changes: 0 additions & 57 deletions .husky/commit-msg

This file was deleted.

59 changes: 3 additions & 56 deletions .husky/pre-commit
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,57 +1,4 @@
#!/bin/sh
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

if [ "$LEFTHOOK_VERBOSE" = "1" -o "$LEFTHOOK_VERBOSE" = "true" ]; then
set -x
fi

if [ "$LEFTHOOK" = "0" ]; then
exit 0
fi

call_lefthook()
{
if test -n "$LEFTHOOK_BIN"
then
"$LEFTHOOK_BIN" "$@"
elif lefthook -h >/dev/null 2>&1
then
lefthook "$@"
else
dir="$(git rev-parse --show-toplevel)"
osArch=$(uname | tr '[:upper:]' '[:lower:]')
cpuArch=$(uname -m | sed 's/aarch64/arm64/;s/x86_64/x64/')
if test -f "$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook"
then
"$dir/node_modules/lefthook-${osArch}-${cpuArch}/bin/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook/bin/lefthook-${osArch}-${cpuArch}/lefthook" "$@"
elif test -f "$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook"
then
"$dir/node_modules/@evilmartians/lefthook-installer/bin/lefthook" "$@"
elif test -f "$dir/node_modules/lefthook/bin/index.js"
then
"$dir/node_modules/lefthook/bin/index.js" "$@"

elif bundle exec lefthook -h >/dev/null 2>&1
then
bundle exec lefthook "$@"
elif yarn lefthook -h >/dev/null 2>&1
then
yarn lefthook "$@"
elif pnpm lefthook -h >/dev/null 2>&1
then
pnpm lefthook "$@"
elif swift package plugin lefthook >/dev/null 2>&1
then
swift package --disable-sandbox plugin lefthook "$@"
elif command -v mint >/dev/null 2>&1
then
mint run csjones/lefthook-plugin "$@"
else
echo "Can't find lefthook in PATH"
fi
fi
}

call_lefthook run "pre-commit" "$@"
# npm test
4 changes: 0 additions & 4 deletions .husky/pre-commit.old

This file was deleted.

57 changes: 0 additions & 57 deletions .husky/prepare-commit-msg

This file was deleted.

0 comments on commit d2dca9a

Please sign in to comment.