mirror of
https://github.com/go-micro/go-micro.git
synced 2025-01-05 10:20:53 +02:00
5772697752
There's really no point in having the `generator` be embedded in a `file` package so we remove the `file` package and make the `generator` package a first class citizen instead.
32 lines
673 B
Go
32 lines
673 B
Go
package template
|
|
|
|
// Makefile is the Makefile template used for new projects.
|
|
var Makefile = `GOPATH:=$(shell go env GOPATH)
|
|
|
|
.PHONY: init
|
|
init:
|
|
@go get -u google.golang.org/protobuf/proto
|
|
@go install github.com/golang/protobuf/protoc-gen-go@latest
|
|
@go install github.com/asim/go-micro/cmd/protoc-gen-micro/v3@latest
|
|
|
|
.PHONY: proto
|
|
proto:
|
|
@protoc --proto_path=. --micro_out=. --go_out=:. proto/{{.Service}}.proto
|
|
|
|
.PHONY: tidy
|
|
tidy:
|
|
@go mod tidy
|
|
|
|
.PHONY: build
|
|
build:
|
|
@go build -o {{.Service}}{{if .Client}}-client{{end}} *.go
|
|
|
|
.PHONY: test
|
|
test:
|
|
@go test -v ./... -cover
|
|
|
|
.PHONY: docker
|
|
docker:
|
|
@docker build -t {{.Service}}{{if .Client}}-client{{end}}:latest .
|
|
`
|