From ab2cdf5921cf60195e569ef05c52fb3a64c01c40 Mon Sep 17 00:00:00 2001 From: "huangsimin@fusen.cn" Date: Tue, 19 Dec 2023 17:06:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E5=AD=90=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- goutils/proto_build/main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/goutils/proto_build/main.go b/goutils/proto_build/main.go index 5a47862..b81c51b 100644 --- a/goutils/proto_build/main.go +++ b/goutils/proto_build/main.go @@ -83,6 +83,10 @@ func ServiceMain() { defer createFileNotExists("protoc.sh", 0755, func(f io.Writer) error { shellstr := `#! /bin/bash +if [ ! -d "proto" ] || [ -z "$(ls -A proto)" ]; then + git submodule init + git submodule update +fi go run -gcflags="-N" proto/goutils/proto_build/main.go` f.Write([]byte(shellstr)) return nil @@ -115,6 +119,10 @@ func GenClientMain() { defer createFileNotExists("protoc.sh", 0755, func(f io.Writer) error { shellstr := `#! /bin/bash +if [ ! -d "proto" ] || [ -z "$(ls -A proto)" ]; then + git submodule init + git submodule update +fi go run -gcflags="-N" proto/goutils/proto_build/main.go client` f.Write([]byte(shellstr)) return nil