/
Makefile
60 lines (43 loc) · 1.31 KB
/
Makefile
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
55
56
57
58
59
export CGO_ENABLED=0
# Target "all" should stay at the top of the file, we want it to be the default target.
.PHONY: all
all: vet test
### Help (lists all documented targets) ###
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+%?:.*?## .*$$' $(MAKEFILE_LIST) | sed 's/^*://g' | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
### General targets ###
.PHONY: build
build:
@echo "Nothing to build in turbine-core"
.PHONY: clean
clean:
@echo "Nothing to clean in turbine-core"
.PHONY: test
test: ## Run unit tests.
CGO_ENABLED=1 go test $(GOTEST_FLAGS) -short -race -cover -covermode=atomic ./...
### Custom targets ###
.PHONY: fmt
fmt: ## Format Go files using gofumpt and gci.
gofumpt -l -w .
gci write --skip-generated .
.PHONY: generate
generate: ## Run go generate.
go generate ./...
.PHONY: vet
vet: ## Run go vet.
go vet ./...
.PHONY: lint
lint: ## Lint Go files using golangci-lint.
golangci-lint run -v
.PHONY: test-integration
test-integration: ## Run integration tests.
go test $(GOTEST_FLAGS) -cover -covermode=atomic -run Integration ./...
.PHONY: tools
tools: ## Run make in "tools", optionally add "tools-[target]" to run a specific target.
make -C tools
.PHONY: proto
proto: ## Generate Turbine GoLang gRPC bindings
make -C proto
ruby-sdk-%:
make -C $(CURDIR)/lib/ruby $*