summaryrefslogtreecommitdiff
path: root/lookForUnwind.go
diff options
context:
space:
mode:
Diffstat (limited to 'lookForUnwind.go')
-rw-r--r--lookForUnwind.go40
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
+}