diff options
| author | Jeff Carr <[email protected]> | 2024-01-31 06:53:20 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-31 06:53:20 -0600 |
| commit | eea6a138cb94956917d2c8cc78250ba3809126ff (patch) | |
| tree | 424bc5e688acc16833748a102ac473bde9d186c6 /lookForUnwind.go | |
| parent | 4d38d78b0d7101b88c810f57899eed130a1b6f9c (diff) | |
now fix the tags
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'lookForUnwind.go')
| -rw-r--r-- | lookForUnwind.go | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/lookForUnwind.go b/lookForUnwind.go index b3be1ad..5c101bb 100644 --- a/lookForUnwind.go +++ b/lookForUnwind.go @@ -2,6 +2,8 @@ package main import ( + "path/filepath" + "go.wit.com/log" ) @@ -11,7 +13,6 @@ func (r *repo) lookToUnwind() bool { currentS := r.status.GetCurrentBranchVersion() log.Info("repo:", r.String(), goSumS, dirtyS, r.lastTag.String(), currentS) - curName := r.status.GetCurrentBranchName() mName := r.status.GetMasterBranchName() @@ -29,12 +30,28 @@ func (r *repo) lookToUnwind() bool { return false } - if "v" + release.versionS != r.lastTag.String() { + if "v"+release.versionS != r.lastTag.String() { log.Info("\trepo version mismatch last vs official", r.lastTag.String(), "!=", release.versionS) r.setGoSumStatus("CAN NOT UNWIND") return false } - r.setGoSumStatus("UNWIND") - return true + fullpath := filepath.Join(me.goSrcPwd.String(), r.String()) + testf := filepath.Join(fullpath, "go.mod") + if Exists(testf) { + log.Info("\trepo is ready. go.mod exists") + r.setGoSumStatus("UNWIND") + return true + } + + fullpath = filepath.Join(me.goSrcPwd.String(), r.String()) + testf = filepath.Join(fullpath, "go.sum") + if Exists(testf) { + log.Info("\trepo is ready. go.sum exists") + r.setGoSumStatus("UNWIND") + return true + } + + r.setGoSumStatus("NO UNWIND?") + return false } |
