project=demo type=service .PHONY: init # init env init: go install google.golang.org/protobuf/cmd/protoc-gen-go@latest go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest go install github.com/go-kratos/kratos/cmd/kratos/v2@latest go install github.com/go-kratos/kratos/cmd/protoc-gen-go-http/v2@latest go install github.com/google/gnostic/cmd/protoc-gen-openapi@latest go install github.com/favadi/protoc-go-inject-tag@latest go install github.com/google/wire/cmd/wire@latest go install github.com/cosmtrek/air@latest .PHONY: api api: @bash script/gen-api.sh $(type) $(project) .PHONY: gen gen: @bash script/gen-project.sh $(type) $(project) .PHONY: run run: @cd app/$(type)/$(project) && air -c air.toml .PHONY: build build: @cd app/$(type)/$(project) && mkdir -p bin && go build -v -o bin/hilo-$(type)-$(project) ./cmd/$(project) .PHONY: build-all build-all: @bash script/build-all.sh service .PHONY: wire wire: @cd app/$(type)/$(project)/cmd/$(project) && wire