From 2a19cd5eefd1e31ea2e7b1e46831943f8142a04a Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Tue, 20 Feb 2024 14:45:43 -0600 Subject: [PATCH] finally rename back to 'Update' --- branchesBox.go | 2 +- goConfig.go | 9 ++++++++- merge.go | 8 ++++---- modifyBox.go | 2 +- structs.go | 2 +- update.go | 4 ++-- 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/branchesBox.go b/branchesBox.go index d64caa1..669b0d7 100644 --- a/branchesBox.go +++ b/branchesBox.go @@ -36,7 +36,7 @@ func (rs *RepoStatus) makeBranchesBox(parent *gui.Node) { } else { log.Info("branch switched to", bname, "failed") } - rs.UpdateNew() + rs.updateNew() }) rs.targetBranch = newgrid.NewDropdown() // `progname:"TARGET"` diff --git a/goConfig.go b/goConfig.go index 310aed6..e1c1cd1 100644 --- a/goConfig.go +++ b/goConfig.go @@ -119,7 +119,7 @@ func (rs *RepoStatus) parseGoSum() (bool, error) { return true, nil } -func (rs *RepoStatus) GoConfig() map[string]string { +func (rs *RepoStatus) GoConfig() map[string]string { return rs.goConfig } @@ -157,3 +157,10 @@ func (rs *RepoStatus) MakeRedomod() (bool, error) { // return the attempt to parse go.mod & go.sum return rs.parseGoSum() } + +func (rs *RepoStatus) IsReleased() bool { + if rs.GetTargetVersion() == rs.GetCurrentVersion() { + return true + } + return false +} diff --git a/merge.go b/merge.go index 9f2a512..2d9a931 100644 --- a/merge.go +++ b/merge.go @@ -22,11 +22,11 @@ func (rs *RepoStatus) MergeUserToDevel() bool { if rs.DoAll(all) { log.Log(WARN, "MergeUserToDevel() failed", rs.Path()) - rs.UpdateNew() + rs.updateNew() return true } // DoAll failed - rs.UpdateNew() + rs.updateNew() return false } @@ -44,11 +44,11 @@ func (rs *RepoStatus) MergeDevelToMaster() bool { if rs.DoAll(all) { log.Log(WARN, "MergeDevelToMaster() failed", rs.Path()) - rs.UpdateNew() + rs.updateNew() return true } // DoAll failed - rs.UpdateNew() + rs.updateNew() return false } diff --git a/modifyBox.go b/modifyBox.go index 502727f..a7c76b9 100644 --- a/modifyBox.go +++ b/modifyBox.go @@ -11,7 +11,7 @@ func (rs *RepoStatus) drawGitCommands(box *gui.Node) { newgrid := rs.gitCommandsGroup.NewGrid("gridnuts", 0, 0) newgrid.NewButton("Rescan Repo", func() { - rs.UpdateNew() + rs.Update() }) newgrid.NewButton("CheckDirty()", func() { diff --git a/structs.go b/structs.go index 5afc1c8..9576bb9 100644 --- a/structs.go +++ b/structs.go @@ -25,7 +25,7 @@ type RepoStatus struct { dirtyLabel *gadgets.OneLiner readOnly *gadgets.OneLiner gitState *gadgets.OneLiner - primitive *gadgets.OneLiner + primitive *gadgets.OneLiner path *gadgets.OneLiner goSrcPath *gadgets.OneLiner diff --git a/update.go b/update.go index 02b5806..6e10e93 100644 --- a/update.go +++ b/update.go @@ -23,7 +23,7 @@ func (rs *RepoStatus) gitBranchAll() { // log.Log(WARN, "branch count =", i) } -func (rs *RepoStatus) UpdateNew() { +func (rs *RepoStatus) updateNew() { if !rs.Ready() { log.Log(WARN, "can't update yet. ready is false") log.Error(errors.New("Update() is not ready yet")) @@ -79,7 +79,7 @@ func (rs *RepoStatus) Update() { } log.Log(INFO, "Update() START") duration := timeFunction(func() { - rs.UpdateNew() + rs.updateNew() }) rs.setSpeed(duration) log.Log(INFO, "Update() END")