Make git directory static in Makefile

We used a git command to find the location of the users git directory.
This resulted in warnings in the CI where git was not installed.
For now we make the git directory static to .git to avoid this as
the directory is mostly located there.
This commit is contained in:
sirkrypt0
2021-05-26 14:05:21 +02:00
committed by Tobias Kantusch
parent fb1c117a2e
commit ca2c989778

View File

@ -21,9 +21,8 @@ deps: ## Get the dependencies
.PHONY: git-hooks .PHONY: git-hooks
git-dir = $(shell git rev-parse --git-dir) git-hooks: .git/hooks/pre-commit ## Install the git-hooks
git-hooks: $(git-dir)/hooks/pre-commit ## Install the git-hooks .git/hooks/%: git_hooks/%
$(git-dir)/hooks/%: git_hooks/%
cp $^ $@ cp $^ $@
chmod 755 $@ chmod 755 $@