diff options
| author | Jeff Carr <[email protected]> | 2024-01-31 06:05:11 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-01-31 06:05:11 -0600 |
| commit | 4d38d78b0d7101b88c810f57899eed130a1b6f9c (patch) | |
| tree | af604d2cd7d7f0e998b684b21e77bbff945b56a4 /lookForUnwind.go | |
| parent | 3e9a55b2acedb3bb872bcf3d21f142cffeb2ca6d (diff) | |
this maybe will redo the tag correctly
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'lookForUnwind.go')
| -rw-r--r-- | lookForUnwind.go | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/lookForUnwind.go b/lookForUnwind.go new file mode 100644 index 0000000..b3be1ad --- /dev/null +++ b/lookForUnwind.go @@ -0,0 +1,40 @@ +// This is a simple example +package main + +import ( + "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) + + + 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") + return false + } + + if r.lastTag.String() != currentS { + log.Info("\trepo version mismatch last vs current", r.lastTag.String(), "!=", currentS) + r.setGoSumStatus("CAN NOT UNWIND") + return false + } + + 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 +} |
