添加自动更新子模块

This commit is contained in:
huangsimin@fusen.cn 2023-12-19 17:06:09 +08:00
parent decff6f2e6
commit ab2cdf5921

View File

@ -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