diff options
Diffstat (limited to 'doRelease.go')
| -rw-r--r-- | doRelease.go | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/doRelease.go b/doRelease.go index a3c5ec8..e350db3 100644 --- a/doRelease.go +++ b/doRelease.go @@ -29,11 +29,15 @@ func doRelease() bool { if shell.Exists("go.mod") { log.Info("go.mod exists ok") } else { - pwd, _ := os.Getwd() - log.Info("go.mod disappeared. need to run go mod init and go mod tidy here:", pwd) - shell.RunRealtime([]string{"go", "mod", "init"}) - shell.RunRealtime([]string{"go", "mod", "tidy"}) - shell.RunRealtime([]string{"go", "mod", "edit", "-go=1.20"}) + log.Info("go.mod missing") + return false + /* + pwd, _ := os.Getwd() + log.Info("go.mod disappeared. need to run go mod init and go mod tidy here:", pwd) + shell.RunRealtime([]string{"go", "mod", "init"}) + shell.RunRealtime([]string{"go", "mod", "tidy"}) + shell.RunRealtime([]string{"go", "mod", "edit", "-go=1.20"}) + */ } curName := me.current.Status.GetCurrentBranchName() @@ -43,7 +47,12 @@ func doRelease() bool { return false } - if !checkValidGoSum(me.current) { + check := me.forge.Repos.FindByGoPath(me.current.GoPath()) + if check == nil { + log.Info("boo, you didn't git clone", me.current.GoPath()) + return false + } + if !me.forge.FinalGoDepsCheck(check) { return false } @@ -116,7 +125,7 @@ func doRelease() bool { me.current.NewScan() pb := me.forge.Repos.FindByGoPath(me.current.GoPath()) if pb != nil { - pb.RedoGoMod() + pb.ParseGoSum() if pb.Published != nil { loop := pb.Published.SortByGoPath() for loop.Scan() { @@ -153,7 +162,12 @@ func doReleaseFindNext() bool { log.Info("findNext() could not find anything") return false } - if checkValidGoSum(me.current) { + check := me.forge.Repos.FindByGoPath(me.current.GoPath()) + if check == nil { + log.Info("boo, you didn't git clone", me.current.GoPath()) + return false + } + if me.forge.FinalGoDepsCheck(check) { return true } return false |
