project=demo .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 # generate api service proto api: @bash script/gen-api.sh service $(project) .PHONY: service service: @bash script/gen-project.sh service $(project) .PHONY: run run: @cd app/service/$(project) && air -c air.toml .PHONY: build # build build: @cd app/service/$(project) && mkdir -p bin && go build -o bin/ ./... wire: @cd app/service/$(project)/cmd/$(project) && wire