diff options
Diffstat (limited to 'doRelease.go')
| -rw-r--r-- | doRelease.go | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/doRelease.go b/doRelease.go index 2f11b38..11a8285 100644 --- a/doRelease.go +++ b/doRelease.go @@ -47,9 +47,9 @@ func doRelease() bool { return false } - check := me.forge.Repos.FindByGoPath(me.current.GoPath()) + check := me.forge.FindByGoPath(me.current.GetGoPath()) if check == nil { - log.Info("boo, you didn't git clone", me.current.GoPath()) + log.Info("boo, you didn't git clone", me.current.GetGoPath()) return false } if !me.forge.FinalGoDepsCheckOk(check) { @@ -57,15 +57,15 @@ func doRelease() bool { badExit(errors.New(msg)) return false } - if check.GoPath == me.startRepo.GoPath { - log.Info("CAN NOT SELF UPDATE.", check.GoPath, "is the same as os.Getwd()") + if check.GetGoPath() == me.startRepo.GetGoPath() { + log.Info("CAN NOT SELF UPDATE.", check.GetGoPath(), "is the same as os.Getwd()") log.Info("go get must be run from somewhere else other than startRepo") log.Info("chdir to autotypist if it exists") - msg := fmt.Sprint("CAN NOT SELF UPDATE.", check.GoPath, "is the same as os.Getwd()") + msg := fmt.Sprint("CAN NOT SELF UPDATE.", check.GetGoPath(), "is the same as os.Getwd()") badExit(errors.New(msg)) } if !me.startRepo.Exists("go.mod") { - log.Info("go.sum missing in", me.startRepo.GoPath) + log.Info("go.sum missing in", me.startRepo.GetGoPath()) log.Info("pick a different repo here") log.Info("todo: error out earlier knowing this will upgrade") log.Info("versions", me.startRepo.GetTargetVersion(), me.startRepo.GetMasterVersion()) @@ -75,8 +75,8 @@ func doRelease() bool { log.Info("\ttag and push", curName, me.release.version.String(), me.releaseReasonS) if err := check.ValidGoSum(); err != nil { - log.Info("ValidGoSum() error", check.GoPath, err) - msg := fmt.Sprint("ValidGoSum() error", check.GoPath, err) + log.Info("ValidGoSum() error", check.GetGoPath(), err) + msg := fmt.Sprint("ValidGoSum() error", check.GetGoPath(), err) badExit(errors.New(msg)) } @@ -84,7 +84,7 @@ func doRelease() bool { var autogen []string all = append(all, []string{"git", "add", "-f", "go.mod"}) autogen = append(autogen, "go.mod") - if check.GoPrimitive { + if check.GoInfo.GoPrimitive { // don't add go.sum here. TODO: check for go.sum file and fail } else { all = append(all, []string{"git", "add", "-f", "go.sum"}) @@ -139,9 +139,9 @@ func doRelease() bool { } } - pb := me.forge.Repos.FindByGoPath(me.current.GoPath()) + pb := me.forge.FindByGoPath(me.current.GetGoPath()) if pb != nil { - pb.UpdatePublished() + // pb.UpdatePublished() /* remove. earlier protected against nil if !pb.IsPrimitive() { loop := pb.Published.SortByGoPath() @@ -228,9 +228,9 @@ func doReleaseFindNext() bool { log.Info("findNext() could not find anything") return false } - check := me.forge.Repos.FindByGoPath(me.current.GoPath()) + check := me.forge.FindByGoPath(me.current.GetGoPath()) if check == nil { - log.Info("boo, you didn't git clone", me.current.GoPath()) + log.Info("boo, you didn't git clone", me.current.GetGoPath()) return false } if findFix { @@ -246,7 +246,7 @@ func doReleaseFindNext() bool { // this pulls the new tag from the golang package repository // to insert the new version func doPublishVersion() bool { - gopath := me.current.GoPath() + gopath := me.current.GetGoPath() docmd := []string{"go", "get", "-v", gopath + "@" + me.release.version.String()} log.Info("SHOULD RUN cmd HERE:", docmd) @@ -258,7 +258,7 @@ func doPublishVersion() bool { // try to pull from google var result cmd.Status - if gopath == me.startRepo.GoPath { + if gopath == me.startRepo.GetGoPath() { log.Info("CAN NOT SELF UPDATE. cmd =", docmd) log.Info("go get must be run from somewhere else other than startRepo") log.Info("chdir to autotypist if it exists") |
