-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (23 loc) · 689 Bytes
/
Makefile
File metadata and controls
34 lines (23 loc) · 689 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
.PHONY: all build compile-only test test-unit test-integration lint tools release-publish clean
BINARY := geekworm_exporter
CMD := ./cmd/$(BINARY)
GOFLAGS := -mod=vendor
all: build
build:
go build $(GOFLAGS) -o $(BINARY) $(CMD)
# Cross-compile for Raspberry Pi (armv7); matches goreleaser targets.
compile-only:
GOARCH=arm GOARM=7 GOOS=linux CGO_ENABLED=0 go build $(GOFLAGS) -o /dev/null $(CMD)
test: test-unit
test-unit:
go test $(GOFLAGS) -v ./...
test-integration:
@echo "No integration tests defined (hardware required)"
lint:
go vet $(GOFLAGS) ./...
tools:
@echo "No extra tools required"
release-publish:
goreleaser release --clean
clean:
rm -f $(BINARY)