summaryrefslogtreecommitdiff
path: root/checkReady.go
diff options
context:
space:
mode:
Diffstat (limited to 'checkReady.go')
-rw-r--r--checkReady.go42
1 files changed, 21 insertions, 21 deletions
diff --git a/checkReady.go b/checkReady.go
index 988efca..b51ba48 100644
--- a/checkReady.go
+++ b/checkReady.go
@@ -29,22 +29,22 @@ func CheckReady() bool {
log.Info("find the next repo first")
return false
}
- goSumS := release.current.getGoSumStatus()
- dirtyS := release.current.dirtyLabel.String()
- lastS := release.current.status.GetLastTagVersion()
- currentS := release.current.status.GetCurrentBranchVersion()
+ goSumS := release.current.Status.GetGoSumStatus()
+ dirtyS := release.current.State()
+ lastS := release.current.Status.GetLastTagVersion()
+ currentS := release.current.Status.GetCurrentBranchVersion()
var targetS string
targetS = release.version.String()
- log.Info("repo:", release.current.String(), goSumS, dirtyS, lastS, currentS, targetS)
+ log.Info("repo:", release.current.State(), goSumS, dirtyS, lastS, currentS, targetS)
if goSumS == "RELEASED" {
return true
}
if goSumS == "PRIMATIVE" {
if targetS == lastS {
- release.current.setGoSumStatus("RELEASED")
+ release.current.Status.SetGoSumStatus("RELEASED")
}
return true
}
@@ -53,45 +53,45 @@ func CheckReady() bool {
}
if goSumS == "READY" {
if targetS == lastS {
- release.current.setGoSumStatus("RELEASED")
+ release.current.Status.SetGoSumStatus("RELEASED")
return true
}
if lastS == currentS {
- release.current.setGoSumStatus("UNRELEASED")
+ release.current.Status.SetGoSumStatus("UNRELEASED")
}
return true
}
- release.current.setGoSumStatus("NOT READY")
- if release.current.status.ReadOnly() {
+ release.current.Status.SetGoSumStatus("NOT READY")
+ if release.current.Status.ReadOnly() {
log.Info("\trepo is read only")
return false
}
if targetS == lastS {
log.Info("\trepo is already done", lastS, "=", targetS)
- release.current.setGoSumStatus("READY")
+ release.current.Status.SetGoSumStatus("READY")
return true
}
if lastS == currentS {
log.Info("\trepo is already done", lastS, "=", targetS)
- release.current.setGoSumStatus("READY")
+ release.current.Status.SetGoSumStatus("READY")
return true
}
if goSumS == "BAD" {
- log.Info("\trepo is ready", release.current.String(), "BAD == BAD")
+ log.Info("\trepo is ready", release.current.State(), "BAD == BAD")
} else {
- log.Info("\trepo is ready maybe", release.current.String(), "BAD !=", goSumS)
+ log.Info("\trepo is ready maybe", release.current.State(), "BAD !=", goSumS)
}
- if release.current.status.CheckDirty() {
+ if release.current.Status.CheckDirty() {
log.Info("\trepo is dirty")
return false
} else {
- log.Info("\trepo is ready", release.current.String(), "not dirty")
+ log.Info("\trepo is ready", release.current.State(), "not dirty")
}
- fullpath := filepath.Join(me.goSrcPwd.String(), release.current.String())
+ fullpath := filepath.Join(me.goSrcPwd.String(), release.current.State())
testf := filepath.Join(fullpath, "go.mod")
if Exists(testf) {
@@ -113,14 +113,14 @@ func CheckReady() bool {
// final checks here
if dirtyS == "unchanged" {
- log.Info("\trepo is ready", release.current.String(), "unchanged")
+ log.Info("\trepo is ready", release.current.Name(), "unchanged")
} else {
log.Info("\trepo is not ready", dirtyS, "!= 'unchanged'")
return false
}
- curName := release.current.status.GetCurrentBranchName()
- mName := release.current.status.GetMasterBranchName()
+ curName := release.current.Status.GetCurrentBranchName()
+ mName := release.current.Status.GetMasterBranchName()
if curName == mName {
log.Info("\trepo is ready working from main branch", curName, "=", mName)
@@ -129,7 +129,7 @@ func CheckReady() bool {
return false
}
- release.current.setGoSumStatus("READY")
+ release.current.Status.SetGoSumStatus("READY")
return true
}