Update() the gui releaser
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
fae78b1812
commit
dbf10cddf7
27
update.go
27
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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue