-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
33 lines (28 loc) · 1.02 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
SHELL := /usr/bin/env bash
include $(wildcard makefiles/*)
.PHONY: check-trufflehog
check-trufflehog:
@if ! which trufflehog > /dev/null 2>&1; then \
echo "TruffleHog is not installed."; \
echo "MacOS users can install it with:"; \
echo " brew install trufflehog"; \
echo ""; \
echo "Linux users can install it with:"; \
echo " curl -sSfL https://raw.githubusercontent.com/trufflesecurity/trufflehog/main/scripts/install.sh | sh -s -- -b /usr/local/bin"; \
echo ""; \
echo "For more details, go to https://github.com/trufflesecurity/trufflehog"; \
exit 1; \
fi
.PHONY: setup-pre-commit
setup-pre-commit:
@if [ ! -f .pre-commit-config.yaml ]; then \
echo ".pre-commit-config.yaml not found. Copying template..."; \
cp .github/config/.pre-commit-config-template.yaml .pre-commit-config.yaml; \
echo ".pre-commit-config.yaml created from template."; \
else \
echo ".pre-commit-config.yaml already exists."; \
fi
.PHONY: init
init: setup-pre-commit check-trufflehog
pip install pre-commit
pre-commit install