forked from pseudomuto/protokit
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (22 loc) · 781 Bytes
/
Makefile
File metadata and controls
29 lines (22 loc) · 781 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
.PHONY: bench release setup test
VERSION = $(shell cat version.go | sed -n 's/.*const Version = "\(.*\)"/\1/p')
setup:
$(info Synching dev tools and dependencies...)
@if test -z $(which retool); then go get github.com/twitchtv/retool; fi
@retool sync
@retool do dep ensure
fixtures/fileset.pb: fixtures/*.proto
$(info Generating fixtures...)
@cd fixtures && go generate
bench:
go test -bench=.
test: fixtures/fileset.pb
@go test -race -cover ./ ./utils
test-ci: fixtures/fileset.pb bench
@retool do goverage -race -coverprofile=coverage.txt -covermode=atomic ./ ./utils
release:
@echo Releasing v${VERSION}...
git add CHANGELOG.md version.go
git commit -m "Bump version to v${VERSION}"
git tag -m "Version ${VERSION}" "v${VERSION}"
git push && git push --tags