diff options
Diffstat (limited to 'lookForUnwind.go')
| -rw-r--r-- | lookForUnwind.go | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/lookForUnwind.go b/lookForUnwind.go deleted file mode 100644 index e195633..0000000 --- a/lookForUnwind.go +++ /dev/null @@ -1,58 +0,0 @@ -// This is a simple example -package main - -import ( - "path/filepath" - - "go.wit.com/lib/gui/repolist" - "go.wit.com/log" -) - -func lookToUnwind(r *repolist.RepoRow) bool { - goSumS := r.GoState() - dirtyS := r.State() - currentS := r.Status.GetCurrentBranchVersion() - log.Info("repo:", r.Name(), goSumS, dirtyS, r.State(), currentS) - - curName := r.Status.GetCurrentBranchName() - mName := r.Status.GetMasterBranchName() - - if curName == mName { - log.Info("\trepo is ready working from main branch", curName, "=", mName) - } else { - log.Info("\trepo is not ready main branch", curName, "!=", mName) - r.SetGoState("CAN NOT UNWIND") - return false - } - - if r.LastTag() != currentS { - log.Info("\trepo version mismatch last vs current", r.LastTag(), "!=", currentS) - r.SetGoState("CAN NOT UNWIND") - return false - } - - if me.release.version.String() != r.LastTag() { - log.Info("\trepo version mismatch last vs official", r.LastTag(), "!=", me.release.version.String()) - r.SetGoState("CAN NOT UNWIND") - return false - } - - fullpath := filepath.Join(me.goSrcPwd.String(), r.GoPath()) - testf := filepath.Join(fullpath, "go.mod") - if Exists(testf) { - log.Info("\trepo is ready. go.mod exists") - r.SetGoState("UNWIND") - return true - } - - fullpath = filepath.Join(me.GoSrcPath(), r.GoPath()) - testf = filepath.Join(fullpath, "go.sum") - if Exists(testf) { - log.Info("\trepo is ready. go.sum exists") - r.SetGoState("UNWIND") - return true - } - - r.SetGoState("NO UNWIND?") - return false -} |
