forked from storj/drpc
-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 889 Bytes
/
Makefile
File metadata and controls
40 lines (32 loc) · 889 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
35
36
37
38
39
40
GO ?= go
PKG = $(shell $(GO) list ./... | grep -v -e '/internal/' -e '/cmd/')
.PHONY: all
all: build test vet lint
.PHONY: build
build:
$(GO) build $(PKG)
.PHONY: test
test:
$(GO) test $(PKG) -count=1
.PHONY: testrace
testrace:
$(GO) test $(PKG) -race -count=1 -v
.PHONY: vet
vet:
$(GO) vet $(PKG)
.PHONY: lint
lint:
staticcheck $(PKG)
golangci-lint run
.PHONY: gen-bazel
gen-bazel:
@echo "Generating WORKSPACE"
@echo 'workspace(name = "io_storj_drpc")' > WORKSPACE
@echo 'Running gazelle...'
$(GO) run github.com/bazelbuild/bazel-gazelle/cmd/gazelle@v0.40.0 \
update --go_prefix=storj.io/drpc --exclude=examples --exclude=scripts --repo_root=.
@echo 'You should now be able to build Cockroach using:'
@echo ' ./dev build short -- --override_repository=io_storj_drpc=$(CURDIR)'
.PHONY: clean-bazel
clean-bazel:
git clean -dxf WORKSPACE BUILD.bazel '**/BUILD.bazel'