rove/Makefile

29 lines
976 B
Makefile
Raw Normal View History

VERSION := $(shell git describe --always --long --dirty --tags)
build:
2020-07-06 17:10:14 +01:00
@echo Running no-output build
go mod download
go build -ldflags="-X 'github.com/mdiluz/rove/cmd/version.Version=${VERSION}'" ./...
install:
2020-07-06 17:10:14 +01:00
@echo Installing to GOPATH
go mod download
go install -ldflags="-X 'github.com/mdiluz/rove/pkg/version.Version=${VERSION}'" ./...
gen:
@echo Installing go dependencies
2020-07-10 19:00:31 +01:00
go install github.com/golang/protobuf/protoc-gen-go
go mod download
2020-07-10 19:00:31 +01:00
@echo Generating rove server gRPC
protoc --proto_path proto --go_out=plugins=grpc,paths=source_relative:proto/ proto/roveapi/roveapi.proto
2020-06-06 18:49:25 +01:00
test:
@echo Run unit and integration tests
docker-compose -f docker-compose-test.yml up --build --exit-code-from=rove-tests --abort-on-container-exit rove-tests
docker-compose -f docker-compose-test.yml down
2020-06-11 18:55:53 +01:00
go tool cover -html=/tmp/coverage-data/c.out -o /tmp/coverage.html
2020-06-11 20:25:03 +01:00
2020-06-11 18:55:53 +01:00
@echo Done, coverage data can be found in /tmp/coverage.html
2020-06-07 23:20:39 +01:00
2020-06-11 18:55:53 +01:00
.PHONY: build install test gen