rove/Makefile
Marc Di Luzio 7ababb79f6 Migrate to gRPC rather than REST with swagger
Will also be adding in a RESTful endpoint to the server as well so it can consume both types
2020-06-12 22:51:18 +01:00

25 lines
865 B
Makefile

VERSION := $(shell git describe --always --long --dirty --tags)
build:
go mod download
go build -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=${VERSION}'" ./...
install:
go mod download
go install -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=${VERSION}'" ./...
gen:
protoc --proto_path pkg/accounts --go_out=plugins=grpc:pkg/accounts/ --go_opt=paths=source_relative pkg/accounts/accounts.proto
protoc --proto_path pkg/rove --go_out=plugins=grpc:pkg/rove/ --go_opt=paths=source_relative pkg/rove/rove.proto
test:
@echo Unit tests
go test -v ./...
@echo Integration tests
docker-compose up --build --exit-code-from=rove-tests --abort-on-container-exit rove-tests
go tool cover -html=/tmp/coverage-data/c.out -o /tmp/coverage.html
@echo Done, coverage data can be found in /tmp/coverage.html
.PHONY: build install test gen