summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--addRepo.go32
-rw-r--r--scan.go13
-rw-r--r--structs.go3
-rw-r--r--viewGuiReleaser.go8
4 files changed, 37 insertions, 19 deletions
diff --git a/addRepo.go b/addRepo.go
index 3ea8042..2535e3f 100644
--- a/addRepo.go
+++ b/addRepo.go
@@ -11,7 +11,8 @@ import (
func (r *Repo) Hide() {
r.pLabel.Hide()
r.lastTag.Hide()
- r.vLabel.Hide()
+ r.currentName.Hide()
+ r.currentVersion.Hide()
r.masterVersion.Hide()
r.develVersion.Hide()
@@ -33,7 +34,8 @@ func (r *Repo) Hidden() bool {
func (r *Repo) Show() {
r.pLabel.Show()
r.lastTag.Show()
- r.vLabel.Show()
+ r.currentName.Show()
+ r.currentVersion.Show()
r.masterVersion.Show()
r.develVersion.Show()
@@ -80,13 +82,19 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str
newRepo.hidden = false
switch r.viewName {
case "autotypist":
- newRepo.lastTag = grid.NewLabel("").SetProgName("lastTag")
+ newRepo.lastTag = newRepo.Status.MirrorLastTag()
+ grid.Append(newRepo.lastTag)
newRepo.masterVersion = grid.NewLabel("").SetProgName("masterVersion")
newRepo.develVersion = grid.NewLabel("").SetProgName("develVersion")
newRepo.userVersion = grid.NewLabel("").SetProgName("userVersion")
newRepo.targetV = r.blind.NewLabel("")
newRepo.dirtyLabel = grid.NewLabel("")
- newRepo.vLabel = grid.NewLabel("").SetProgName("current")
+
+ newRepo.currentName = newRepo.Status.MirrorCurrentName()
+ grid.Append(newRepo.currentName)
+ newRepo.currentVersion = newRepo.Status.MirrorCurrentVersion()
+ grid.Append(newRepo.currentVersion)
+
newRepo.endBox = grid.NewHorizontalBox("HBOX")
newRepo.endBox.NewButton("Configure", func() {
if newRepo.Status == nil {
@@ -143,12 +151,20 @@ func (r *RepoList) addRepo(grid *gui.Node, path string, master string, devel str
}
newRepo.goState = r.blind.NewLabel("in the blind")
case "guireleaser":
- newRepo.targetV = grid.NewLabel("")
- newRepo.lastTag = grid.NewLabel("").SetProgName("lastTag")
- newRepo.masterVersion = grid.NewLabel("").SetProgName("masterVersion")
+ newRepo.targetV = newRepo.Status.MirrorTargetVersion()
+ grid.Append(newRepo.targetV)
+
+ newRepo.lastTag = newRepo.Status.MirrorLastTag()
+ grid.Append(newRepo.lastTag)
+
+ newRepo.currentName = newRepo.Status.MirrorCurrentName()
+ grid.Append(newRepo.currentName)
+ newRepo.currentVersion = newRepo.Status.MirrorCurrentVersion()
+ grid.Append(newRepo.currentVersion)
+
+ newRepo.masterVersion = r.blind.NewLabel("").SetProgName("masterVersion")
newRepo.dirtyLabel = grid.NewLabel("")
newRepo.goState = grid.NewLabel("not in the blind")
- newRepo.vLabel = grid.NewLabel("").SetProgName("current")
newRepo.endBox = grid.NewHorizontalBox("HBOX")
newRepo.endBox.NewButton("Configure", func() {
if newRepo.Status == nil {
diff --git a/scan.go b/scan.go
index 68fc036..a715dda 100644
--- a/scan.go
+++ b/scan.go
@@ -55,11 +55,12 @@ func (r *Repo) NewScan() bool {
}
r.userVersion.SetLabel(uver)
- cbname := r.Status.GetCurrentBranchName()
- cbversion := r.Status.GetCurrentBranchVersion()
- lasttag := r.Status.GetLastTagVersion()
- r.lastTag.SetLabel(lasttag)
- r.vLabel.SetLabel(cbname + " " + cbversion)
+ // cbname := r.Status.GetCurrentBranchName()
+ // cbversion := r.Status.GetCurrentBranchVersion()
+ // lasttag := r.Status.GetLastTagVersion()
+ // r.lastTag.SetLabel(lasttag)
+ // r.currentName.SetLabel(cbname)
+ // r.currentVersion.SetLabel(cbversion)
if c, ok := r.Status.Changed(); ok {
c := strings.TrimSpace(c)
@@ -67,7 +68,7 @@ func (r *Repo) NewScan() bool {
log.Info(r.Status.Path(), line)
}
}
- r.targetV.SetText(r.Status.GetTargetVersion())
+ // r.targetV.SetText(r.Status.GetTargetVersion())
status := r.Status.GetStatus()
r.dirtyLabel.SetLabel(status)
diff --git a/structs.go b/structs.go
index a2b1413..cba4b69 100644
--- a/structs.go
+++ b/structs.go
@@ -43,7 +43,8 @@ type Repo struct {
targetV *gui.Node // the target version
lastTag *gui.Node // last tagged version label
- vLabel *gui.Node // version label
+ currentName *gui.Node // current branch name
+ currentVersion *gui.Node // current branch version
dirtyLabel *gui.Node // git state (dirty or not?)
goState *gui.Node // what is the state of the go.sum file
diff --git a/viewGuiReleaser.go b/viewGuiReleaser.go
index f9dcd7d..7b2cfbc 100644
--- a/viewGuiReleaser.go
+++ b/viewGuiReleaser.go
@@ -21,10 +21,10 @@ func GuireleaserView(parent *gui.Node) *RepoList {
me.reposgrid.NewLabel("") // path goes here
me.reposgrid.NewLabel("target")
me.reposgrid.NewLabel("last tag").SetProgName("last tag")
- me.reposgrid.NewLabel("master version")
- me.reposgrid.NewLabel("Status")
- me.reposgrid.NewLabel("GO Status")
- me.reposgrid.NewLabel("Current Version").SetProgName("Current Version")
+ me.reposgrid.NewLabel("Current")
+ me.reposgrid.NewLabel("Version")
+ me.reposgrid.NewLabel("git State")
+ me.reposgrid.NewLabel("GO State")
me.reposgrid.NextRow()
me.blind = gui.RawBox()
return me