have to auto run protoc
This commit is contained in:
parent
dc356e9d0f
commit
d24d836899
|
@ -5,6 +5,7 @@ package main
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"go.wit.com/lib/gui/shell"
|
"go.wit.com/lib/gui/shell"
|
||||||
"go.wit.com/lib/protobuf/forgepb"
|
"go.wit.com/lib/protobuf/forgepb"
|
||||||
|
@ -34,8 +35,16 @@ func protocBuild(names map[string]string) error {
|
||||||
}
|
}
|
||||||
log.Info("make protoc file:", names["protoc"])
|
log.Info("make protoc file:", names["protoc"])
|
||||||
log.Info("go src", forge.GetGoSrc())
|
log.Info("go src", forge.GetGoSrc())
|
||||||
|
pwd, _ := os.Getwd()
|
||||||
|
log.Info("go.Getwd()", pwd)
|
||||||
|
if ! strings.HasPrefix(pwd, forge.GetGoSrc()) {
|
||||||
|
return errors.New("paths don't match")
|
||||||
|
}
|
||||||
|
gopath := strings.TrimPrefix(pwd, forge.GetGoSrc())
|
||||||
|
log.Info("gopath", gopath)
|
||||||
return errors.New("make protoc here")
|
return errors.New("make protoc here")
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
data, err := os.ReadFile(fullname)
|
data, err := os.ReadFile(fullname)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue