Skip to content

Commit

Permalink
Merge pull request #238 from djpohly/gitdir-hook
Browse files Browse the repository at this point in the history
Copy pre-commit hook to real GIT_DIR
  • Loading branch information
Chemaclass authored Dec 24, 2023
2 parents ffa4136 + 0bd1524 commit de7fe58
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ SHELL=/bin/bash

STATIC_ANALYSIS_CHECKER := $(shell which shellcheck 2> /dev/null)
LINTER_CHECKER := $(shell which ec 2> /dev/null)
GIT_DIR = $(shell git rev-parse --git-dir 2> /dev/null)

OS:=
ifeq ($(OS),Windows_NT)
Expand Down Expand Up @@ -72,7 +73,7 @@ env/example:

pre_commit/install:
@echo "Installing pre-commit hooks"
cp $(PRE_COMMIT_SCRIPTS_FILE) ./.git/hooks/
cp $(PRE_COMMIT_SCRIPTS_FILE) $(GIT_DIR)/hooks/

pre_commit/run: test sa lint env/example

Expand Down

0 comments on commit de7fe58

Please sign in to comment.