mirror of
https://github.com/go-micro/go-micro.git
synced 2025-05-25 21:53:14 +02:00
chore(gomu): tweak makefile
template (#2238)
This commit is contained in:
parent
a159598f36
commit
e080791787
@ -5,27 +5,27 @@ var Makefile = `GOPATH:=$(shell go env GOPATH)
|
|||||||
|
|
||||||
.PHONY: init
|
.PHONY: init
|
||||||
init:
|
init:
|
||||||
go get -u google.golang.org/protobuf/proto
|
@go get -u google.golang.org/protobuf/proto
|
||||||
go install github.com/golang/protobuf/protoc-gen-go@latest
|
@go install github.com/golang/protobuf/protoc-gen-go@latest
|
||||||
go install github.com/asim/go-micro/cmd/protoc-gen-micro/v3@latest
|
@go install github.com/asim/go-micro/cmd/protoc-gen-micro/v3@latest
|
||||||
|
|
||||||
.PHONY: proto
|
.PHONY: proto
|
||||||
proto:
|
proto:
|
||||||
protoc --proto_path=. --micro_out=. --go_out=:. proto/{{.Alias}}.proto
|
@protoc --proto_path=. --micro_out=. --go_out=:. proto/{{.Alias}}.proto
|
||||||
|
|
||||||
.PHONY: tidy
|
.PHONY: tidy
|
||||||
tidy:
|
tidy:
|
||||||
go mod tidy
|
@go mod tidy
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build:
|
build:
|
||||||
go build -o {{.Alias}} *.go
|
@go build -o {{.Alias}} *.go
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
test:
|
test:
|
||||||
go test -v ./... -cover
|
@go test -v ./... -cover
|
||||||
|
|
||||||
.PHONY: docker
|
.PHONY: docker
|
||||||
docker:
|
docker:
|
||||||
docker build -t {{.Alias}}:latest .
|
@docker build -t {{.Alias}}:latest .
|
||||||
`
|
`
|
||||||
|
Loading…
x
Reference in New Issue
Block a user