summaryrefslogtreecommitdiff
path: root/lookForUnwind.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-02-18 15:09:04 -0600
committerJeff Carr <[email protected]>2024-02-18 15:09:04 -0600
commit08c7765cc70bae20479ad0aa1897b6a4cfc3613a (patch)
treedacc65539b521cd3fc285579712bd2ef7bd8a486 /lookForUnwind.go
parentbbc78159fe11c78ae33cc8026887f62888003630 (diff)
guireleaser builds again
Diffstat (limited to 'lookForUnwind.go')
-rw-r--r--lookForUnwind.go39
1 files changed, 20 insertions, 19 deletions
diff --git a/lookForUnwind.go b/lookForUnwind.go
index 1ca7954..3387921 100644
--- a/lookForUnwind.go
+++ b/lookForUnwind.go
@@ -4,54 +4,55 @@ package main
import (
"path/filepath"
+ "go.wit.com/lib/gui/repolist"
"go.wit.com/log"
)
-func (r *repo) lookToUnwind() bool {
- goSumS := r.getGoSumStatus()
- dirtyS := r.dirtyLabel.String()
- currentS := r.status.GetCurrentBranchVersion()
- log.Info("repo:", r.String(), goSumS, dirtyS, r.lastTag.String(), currentS)
+func lookToUnwind(r *repolist.Repo) bool {
+ goSumS := r.Status.GetGoSumStatus()
+ 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()
+ 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.setGoSumStatus("CAN NOT UNWIND")
+ r.Status.SetGoSumStatus("CAN NOT UNWIND")
return false
}
- if r.lastTag.String() != currentS {
- log.Info("\trepo version mismatch last vs current", r.lastTag.String(), "!=", currentS)
- r.setGoSumStatus("CAN NOT UNWIND")
+ if r.LastTag() != currentS {
+ log.Info("\trepo version mismatch last vs current", r.LastTag(), "!=", currentS)
+ r.Status.SetGoSumStatus("CAN NOT UNWIND")
return false
}
- if release.version.String() != r.lastTag.String() {
- log.Info("\trepo version mismatch last vs official", r.lastTag.String(), "!=", release.version.String())
- r.setGoSumStatus("CAN NOT UNWIND")
+ if release.version.String() != r.LastTag() {
+ log.Info("\trepo version mismatch last vs official", r.LastTag(), "!=", release.version.String())
+ r.Status.SetGoSumStatus("CAN NOT UNWIND")
return false
}
- fullpath := filepath.Join(me.goSrcPwd.String(), r.String())
+ 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.setGoSumStatus("UNWIND")
+ r.Status.SetGoSumStatus("UNWIND")
return true
}
- fullpath = filepath.Join(me.goSrcPwd.String(), r.String())
+ 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.setGoSumStatus("UNWIND")
+ r.Status.SetGoSumStatus("UNWIND")
return true
}
- r.setGoSumStatus("NO UNWIND?")
+ r.Status.SetGoSumStatus("NO UNWIND?")
return false
}