disable Git hook inside docker container

This commit is contained in:
HTWKalender Team
2024-07-16 14:55:22 -04:00
parent 1dace08128
commit 8e039c4ecb
2 changed files with 9 additions and 6 deletions

View File

@ -43,10 +43,13 @@ tidy-deps: ## Remove unused dependencies
.PHONY: git-hooks
git-hooks: .git/hooks/pre-commit ## Install the git-hooks
.git/hooks/%: git_hooks/%
cp $^ $@
chmod 755 $@
GIT_HOOKS_DIR := $(shell if [ -f .git ]; then echo $$(cat .git | sed 's/gitdir: //')/hooks; else echo .git/hooks; fi)
git-hooks: $(GIT_HOOKS_DIR)/pre-commit ## Install the git-hooks
$(GIT_HOOKS_DIR)/%: git_hooks/%
@if [ -d "$(GIT_HOOKS_DIR)" ]; then \
cp $^ $@; \
chmod 755 $@; \
fi
.PHONY: build
build: deps ## Build the binary