-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 934 Bytes
/
Makefile
File metadata and controls
33 lines (26 loc) · 934 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
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
LDFLAGS := -ldflags "-X main.version=$(VERSION)"
.PHONY: build install clean test
# Build the binary
build:
go build $(LDFLAGS) -o engage ./cmd/engage
# Install to GOPATH/bin
install:
go install $(LDFLAGS) ./cmd/engage
# Clean build artifacts
clean:
rm -f engage
go clean
# Run tests
test:
go test ./...
# Run fuzz tests
fuzz:
go test -fuzz=FuzzParse -fuzztime=5s ./internal/task
go test -fuzz=FuzzConfigUnmarshal -fuzztime=5s ./internal/config
# Build for multiple platforms
release:
GOOS=linux GOARCH=amd64 go build $(LDFLAGS) -o dist/engage-linux-amd64 ./cmd/engage
GOOS=darwin GOARCH=amd64 go build $(LDFLAGS) -o dist/engage-darwin-amd64 ./cmd/engage
GOOS=darwin GOARCH=arm64 go build $(LDFLAGS) -o dist/engage-darwin-arm64 ./cmd/engage
GOOS=windows GOARCH=amd64 go build $(LDFLAGS) -o dist/engage-windows-amd64.exe ./cmd/engage