forked from leaktk/patterns
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 1.14 KB
/
Makefile
File metadata and controls
36 lines (27 loc) · 1.14 KB
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
33
34
35
36
PATTERN_FILES := target/patterns/gitleaks/7.6.1
PATTERN_FILES += target/patterns/gitleaks/8.18.2
PATTERN_FILES += target/patterns/gitleaks/8.27.0
.PHONY: build
build: $(PATTERN_FILES)
.PHONY: clean
clean:
rm -rf target
format:
black tests
grep -lPR '\t' patterns/ | xargs -r sed -i 's/\t/ /g'
./scripts/sort-and-group-in-place ./testdata/leaktk-scanner-results.yaml
./scripts/sort-and-group-in-place ./testdata/gitleaks-7.6.1-results.yaml
.PHONY: test
test: clean build
@./scripts/$@
target/patterns/gitleaks:
mkdir -p $@
target/patterns/gitleaks/7.6.1: target/patterns/gitleaks $(wildcard patterns/gitleaks/7.6.1/*)
./scripts/compile patterns/gitleaks/7.6.1 > $@
target/patterns/gitleaks/8.18.2: target/patterns/gitleaks $(wildcard patterns/gitleaks/8.18.2/*)
./scripts/compile patterns/gitleaks/8.18.2 > $@
target/patterns/gitleaks/8.27.0: target/patterns/gitleaks $(wildcard patterns/gitleaks/8.27.0/*)
./scripts/compile patterns/gitleaks/8.27.0 > $@
update-fake-leaks:
cd testdata/fake-leaks && git checkout main && git pull
if [[ -n "$$(git status -s)" ]]; then git add testdata/fake-leaks && git commit -m "Update fake-leaks commit"; fi