diff options
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -71,16 +71,20 @@ func main() { log.Info("pwd = ", pwd) if !shell.Exists("go.sum") { - shell.RunQuiet([]string{"go", "mod", "init"}) - shell.RunQuiet([]string{"go", "mod", "tidy"}) - shell.RunQuiet([]string{"go", "mod", "edit", "-go=1.18"}) // TODO: pass this as ENV. verify protobuf version needed + shell.RunQuiet([]string{"go-mod-clean"}) + if !shell.Exists("go.sum") { + shell.RunQuiet([]string{"go", "mod", "init"}) + shell.RunQuiet([]string{"go", "mod", "tidy"}) + shell.RunQuiet([]string{"go", "mod", "edit", "-go=1.18"}) // TODO: pass this as ENV. verify protobuf version needed + } } var packageName string var result cmd.Status var cmd []string if argv.Package == "" { - // TODO: switch to using forgepb + // TODO: switch to using forgepb (expose the functions/logic from forgepb directly + // it could be a bad idea to use forge.Init() here as forge needs this to build // switch to forgepb os.Setenv("GO111MODULE", "off") // keeps go list working if go version is back versioned for compatability cmd = []string{"go", "list", "-f", "'{{.Name}}'"} |
