summaryrefslogtreecommitdiff
path: root/update.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-01-31 02:30:14 -0600
committerJeff Carr <[email protected]>2024-01-31 02:30:14 -0600
commitdbf10cddf7f540dac450318524b0f31a24e55589 (patch)
tree87d133d10c97ed33b5353be4d5dbf1edd8e1bc73 /update.go
parentfae78b181212643cf9e017690bfa00fdda0d0090 (diff)
Update() the gui releaser
Signed-off-by: Jeff Carr <[email protected]>
Diffstat (limited to 'update.go')
-rw-r--r--update.go27
1 files changed, 27 insertions, 0 deletions
diff --git a/update.go b/update.go
index 9b72b00..96406b2 100644
--- a/update.go
+++ b/update.go
@@ -130,3 +130,30 @@ func (rs *RepoStatus) EnableSelectTag() {
rs.releaseVersion.Enable()
}
}
+
+func (rs *RepoStatus) UpdateCurrent() {
+ if !rs.Ready() {
+ log.Log(WARN, "can't update yet. ready is false")
+ log.Error(errors.New("Update() is not ready yet"))
+ return
+ }
+ log.Log(INFO, "Update() START")
+ // do things that are safe even if the git tree is dirty
+ // rs.path.SetValue(rs.repopath)
+ rs.getCurrentBranchName()
+ // rs.window.SetTitle(rs.repopath + " GO repo Details")
+ rs.getCurrentBranchVersion()
+ rs.getLastTagVersion()
+ rs.populateTags()
+ rs.CheckDirty()
+
+ // this looks into .git somewhat
+ rs.CheckBranches()
+
+ if rs.dirtyLabel.String() != "no" {
+ // the repo is dirty
+ log.Warn("dirty label != no. actual value:", rs.dirtyLabel.String())
+ rs.DisableEverything()
+ return
+ }
+}