-
Notifications
You must be signed in to change notification settings - Fork 58
Expand file tree
/
Copy pathMakefile
More file actions
31 lines (21 loc) · 817 Bytes
/
Makefile
File metadata and controls
31 lines (21 loc) · 817 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
VERSION := $(shell git describe --always --abbrev=0 --tags)
LDFLAGS := -ldflags='-X main.Version=$(VERSION) -extldflags "-static"'
CGO_ENABLED ?= 0
GOARCH ?= $(shell go env GOARCH)
GOOS ?= $(shell go env GOOS)
.PHONY: build test test-unit test-integration test-database test-cmd test-viewer clean
build:
CGO_ENABLED=$(CGO_ENABLED) GOARCH=$(GOARCH) GOOS=$(GOOS) go build $(LDFLAGS) -o rita
test: test-unit test-integration test-database test-cmd test-viewer
test-unit:
go test --cover $$(go list ./... | grep -v /integration | grep -v /database | grep -v /cmd | grep -v /viewer)
test-integration:
go test ./integration/... -timeout 1800s
test-database:
go test ./database/... -timeout 1800s
test-cmd:
go test ./cmd/... -timeout 1800s
test-viewer:
go test ./viewer/... -timeout 1800s
clean:
rm -f rita