-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (32 loc) · 1.18 KB
/
Makefile
File metadata and controls
45 lines (32 loc) · 1.18 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
37
38
39
40
41
42
43
44
45
.PHONY: build test lint golangci fmt vet vuln clean docker-build docker-up docker-down docker-logs release-snapshot
build:
go build ./...
test:
go test -race ./...
# `make lint` is the local CI equivalent: format, vet, then full static-analysis
# pass via golangci-lint (configured in .golangci.yml).
lint: fmt vet golangci
golangci:
@command -v golangci-lint >/dev/null || { echo "golangci-lint not installed — install from https://golangci-lint.run/"; exit 1; }
golangci-lint run ./...
fmt:
@out=$$(gofmt -l .); if [ -n "$$out" ]; then echo "unformatted files:\n$$out"; exit 1; fi
vet:
go vet ./...
vuln:
govulncheck ./...
clean:
rm -f wintermute neuromancer agent
docker-build:
docker build -t networkinventoryagent .
docker-up:
docker compose up --build -d
docker-down:
docker compose down
docker-logs:
docker compose logs -f
# `make release-snapshot` runs goreleaser without cutting a tag — useful
# for validating the .goreleaser.yaml after edits. Drops everything in ./dist.
release-snapshot:
@command -v goreleaser >/dev/null || { echo "goreleaser not installed — install from https://goreleaser.com/install/"; exit 1; }
goreleaser release --snapshot --clean --skip=sign