-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (39 loc) · 1019 Bytes
/
Makefile
File metadata and controls
48 lines (39 loc) · 1019 Bytes
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
37
38
39
40
41
42
43
44
45
46
47
48
all: zannotate
zannotate:
cd cmd/zannotate && \
go build -o zannotate && \
cd - && \
mv cmd/zannotate/zannotate .
clean:
rm -f zannotate
install:
cd cmd/zannotate && \
go install
uninstall:
# Remove the binary from the $PATH
@echo "Are you sure you want to uninstall zannotate? (y/n)"
@read -r answer && \
if [ "$$answer" = "y" ]; then \
rm -f $$(which zannotate 2>/dev/null || true); \
echo "zannotate has been uninstalled."; \
else \
echo "Uninstallation cancelled."; \
fi
test: zannotate
go test -v ./...
@if [ ! -d ".venv" ]; then \
python3 -m venv .venv; \
fi
@. .venv/bin/activate && \
pip install -r requirements.txt -q && \
pytest test_zannotate.py -v
lint:
goimports -w -local "github.com/zmap/zannotate" ./
gofmt -s -w ./
golangci-lint run
@if ! command -v black >/dev/null 2>&1; then pip3 install black; fi
black ./
license-check:
./.github/workflows/check_license.sh
ci: zannotate lint test license-check
.PHONY: zannotate clean install test lint ci license-check