minor mv code
This commit is contained in:
parent
f888dab0f2
commit
5846d5e4af
2
Makefile
2
Makefile
|
@ -1,7 +1,7 @@
|
||||||
VERSION = $(shell git describe --tags)
|
VERSION = $(shell git describe --tags)
|
||||||
BUILDTIME = $(shell date +%Y.%m.%d)
|
BUILDTIME = $(shell date +%Y.%m.%d)
|
||||||
|
|
||||||
run: vet build
|
run: goimports vet install
|
||||||
|
|
||||||
vet:
|
vet:
|
||||||
@GO111MODULE=off go vet
|
@GO111MODULE=off go vet
|
||||||
|
|
12
main.go
12
main.go
|
@ -52,6 +52,18 @@ func main() {
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// have to figure out how to run protoc so initialize forge
|
||||||
|
forge = forgepb.Init()
|
||||||
|
|
||||||
|
gosrc := forge.GetGoSrc()
|
||||||
|
pwd, _ := os.Getwd()
|
||||||
|
|
||||||
|
if strings.HasPrefix(pwd, gosrc) {
|
||||||
|
log.Info("does match", pwd, "vs", gosrc)
|
||||||
|
} else {
|
||||||
|
log.Info("does not match. should exit(-1) here", pwd, "vs", gosrc)
|
||||||
|
}
|
||||||
|
|
||||||
if !shell.Exists("go.sum") {
|
if !shell.Exists("go.sum") {
|
||||||
shell.RunQuiet([]string{"go", "mod", "init"})
|
shell.RunQuiet([]string{"go", "mod", "init"})
|
||||||
shell.RunQuiet([]string{"go", "mod", "tidy"})
|
shell.RunQuiet([]string{"go", "mod", "tidy"})
|
||||||
|
|
|
@ -9,7 +9,6 @@ import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"go.wit.com/lib/gui/shell"
|
"go.wit.com/lib/gui/shell"
|
||||||
"go.wit.com/lib/protobuf/forgepb"
|
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -31,11 +30,6 @@ func protocBuild(names map[string]string) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// have to figure out how to run protoc so initialize forge
|
|
||||||
forge = forgepb.Init()
|
|
||||||
// forge.ConfigPrintTable()
|
|
||||||
os.Setenv("REPO_WORK_PATH", forge.GetGoSrc())
|
|
||||||
|
|
||||||
log.Info("")
|
log.Info("")
|
||||||
if shell.Exists(names["protoc"]) {
|
if shell.Exists(names["protoc"]) {
|
||||||
log.Info("protoc file already created", names["protoc"])
|
log.Info("protoc file already created", names["protoc"])
|
||||||
|
|
Loading…
Reference in New Issue