include .env include .env.local .PHONY: proto run: go run cmd/mp-server/main.go \ --wx.app.id=${WEIXIN_APP_ID} \ --wx.app.secret=${WEIXIN_APP_SECRET} \ --pg.dsn=${POSTGRES_DSN} clean: rm -rf ${PROTOC_OUT_DIR} rm -rf ${OPENAPI_OUT_DIR} all: api docker.push: docker push esinio/weixin:oauth2 api: api.out.dir api.oauth2 @echo "\nall protos generated \n" api.out.dir: mkdir -p ${PROTOC_OUT_DIR} mkdir -p ${OPENAPI_OUT_DIR} api.oauth2: api.out.dir protoc \ --proto_path ${PROTOC_SRC_DIR} \ --proto_path ${PROTOC_SRC_DIR}/third_party \ --go_out ${PROTOC_OUT_DIR} \ --go_opt paths=source_relative \ --go-grpc_out ${PROTOC_OUT_DIR} \ --go-grpc_opt paths=source_relative \ --grpc-gateway_out ${PROTOC_OUT_DIR} \ --grpc-gateway_opt paths=source_relative \ --grpc-gateway_opt logtostderr=true \ --grpc-gateway_opt generate_unbound_methods=true \ --openapiv2_out ${OPENAPI_OUT_DIR} \ --openapiv2_opt logtostderr=true \ ${PROTOC_SRC_DIR}/clientapi/mp/auth/auth.proto