Files
services/vehicle/Makefile
Asim Aslam 9b6010372e add vehicle api (#221)
* add vehicle api

* Commit from GitHub Actions (Publish APIs & Clients)

Co-authored-by: asim <asim@users.noreply.github.com>
2021-10-04 12:14:31 +01:00

29 lines
579 B
Makefile

GOPATH:=$(shell go env GOPATH)
.PHONY: init
init:
go get -u github.com/golang/protobuf/proto
go get -u github.com/golang/protobuf/protoc-gen-go
go get github.com/micro/micro/v3/cmd/protoc-gen-micro
go get github.com/micro/micro/v3/cmd/protoc-gen-openapi
.PHONY: api
api:
protoc --openapi_out=. --proto_path=. proto/vehicle.proto
.PHONY: proto
proto:
protoc --proto_path=. --micro_out=. --go_out=:. proto/vehicle.proto
.PHONY: build
build:
go build -o vehicle *.go
.PHONY: test
test:
go test -v ./... -cover
.PHONY: docker
docker:
docker build . -t vehicle:latest