-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (42 loc) · 1.13 KB
/
Copy pathMakefile
File metadata and controls
54 lines (42 loc) · 1.13 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
46
47
48
49
50
51
52
53
54
.PHONY: build test clean install run example
# Build the application
build:
go build -o trustgraph ./cmd/trustgraph
# Run tests
test:
go test ./...
# Run tests with coverage
test-coverage:
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out -o coverage.html
# Clean build artifacts
clean:
rm -f trustgraph
rm -f coverage.out coverage.html
rm -f *.dot *.png *.json
# Install the binary
install:
go install ./cmd/trustgraph
# Run with example graph
example:
go run ./cmd/trustgraph -example
# Run with sample JSON
run-sample:
go run ./cmd/trustgraph -input examples/sample.json -output graph.dot
# Format code
fmt:
go fmt ./...
# Run linter
lint:
go vet ./...
# Tidy dependencies
tidy:
go mod tidy
# Run all checks
check: fmt lint test
# Build for multiple platforms
build-all:
GOOS=linux GOARCH=amd64 go build -o bin/trustgraph-linux-amd64 ./cmd/trustgraph
GOOS=darwin GOARCH=amd64 go build -o bin/trustgraph-darwin-amd64 ./cmd/trustgraph
GOOS=darwin GOARCH=arm64 go build -o bin/trustgraph-darwin-arm64 ./cmd/trustgraph
GOOS=windows GOARCH=amd64 go build -o bin/trustgraph-windows-amd64.exe ./cmd/trustgraph