show devel and user versions
This commit is contained in:
parent
7d5786782c
commit
c672ab70da
23
newRepo.go
23
newRepo.go
|
@ -1,8 +1,6 @@
|
||||||
package repolist
|
package repolist
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
|
||||||
|
|
||||||
"go.wit.com/lib/gui/repostatus"
|
"go.wit.com/lib/gui/repostatus"
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
@ -81,24 +79,24 @@ func (r *RepoList) AddRepo(pb *gitpb.Repo) (*RepoRow, error) {
|
||||||
newRepo.hidden = false
|
newRepo.hidden = false
|
||||||
|
|
||||||
r.allrepos[pb.GoPath] = newRepo
|
r.allrepos[pb.GoPath] = newRepo
|
||||||
newRepo.NewScan()
|
// newRepo.NewScan()
|
||||||
|
|
||||||
|
newRepo.lastTag = r.reposgrid.NewLabel("")
|
||||||
|
newRepo.masterVersion = r.reposgrid.NewLabel("")
|
||||||
|
newRepo.develVersion = r.reposgrid.NewLabel("")
|
||||||
|
newRepo.userVersion = r.reposgrid.NewLabel("")
|
||||||
|
newRepo.gitState = r.reposgrid.NewLabel("")
|
||||||
|
newRepo.currentName = r.reposgrid.NewLabel("")
|
||||||
|
newRepo.currentVersion = r.reposgrid.NewLabel("")
|
||||||
|
|
||||||
switch r.viewName {
|
|
||||||
case "autotypist":
|
|
||||||
r.makeAutotypistView(newRepo)
|
|
||||||
case "guireleaser":
|
|
||||||
r.makeGuireleaserView(newRepo)
|
|
||||||
default:
|
|
||||||
r.makeAutotypistView(newRepo)
|
|
||||||
}
|
|
||||||
r.reposgrid.NextRow()
|
r.reposgrid.NextRow()
|
||||||
newRepo.Status.InitOk = true
|
newRepo.Status.InitOk = true
|
||||||
// newRepo.Hide()
|
// newRepo.Hide()
|
||||||
return newRepo, nil
|
return newRepo, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
func (r *RepoList) makeAutotypistView(newRepo *RepoRow) {
|
func (r *RepoList) makeAutotypistView(newRepo *RepoRow) {
|
||||||
grid := r.reposgrid
|
|
||||||
|
|
||||||
newRepo.lastTag = grid.NewLabel("")
|
newRepo.lastTag = grid.NewLabel("")
|
||||||
newRepo.masterVersion = grid.NewLabel("")
|
newRepo.masterVersion = grid.NewLabel("")
|
||||||
|
@ -161,6 +159,7 @@ func (r *RepoList) makeAutotypistView(newRepo *RepoRow) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
func (r *RepoList) makeGuireleaserView(newRepo *RepoRow) {
|
func (r *RepoList) makeGuireleaserView(newRepo *RepoRow) {
|
||||||
grid := r.reposgrid
|
grid := r.reposgrid
|
||||||
|
|
56
scan.go
56
scan.go
|
@ -58,32 +58,40 @@ func (r *RepoRow) NewScan() int {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// r.masterVersion.SetLabel(r.pb.GetMasterVersion())
|
if r.masterVersion == nil {
|
||||||
// r.develVersion.SetLabel(r.pb.GetDevelVersion())
|
panic("what the fuck node")
|
||||||
// r.userVersion.SetLabel(r.pb.GetUserVersion())
|
}
|
||||||
// r.gitState.SetLabel(r.Status.GetState())
|
if r.pb == nil {
|
||||||
// r.currentName.SetLabel(r.Status.CurrentBranchName())
|
panic("what the fuck pb")
|
||||||
// r.currentVersion.SetLabel(r.Status.CurrentBranchVersion())
|
}
|
||||||
|
r.masterVersion.SetLabel(r.pb.GitMasterVersion())
|
||||||
|
r.develVersion.SetLabel(r.pb.GitDevelVersion())
|
||||||
|
r.userVersion.SetLabel(r.pb.GitUserVersion())
|
||||||
|
// r.gitState.SetLabel(r.Status.GetState())
|
||||||
|
// r.currentName.SetLabel(r.Status.CurrentBranchName())
|
||||||
|
// r.currentVersion.SetLabel(r.Status.CurrentBranchVersion())
|
||||||
|
|
||||||
tags := []string{"%(objectname)", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"}
|
/*
|
||||||
format := strings.Join(tags, "_,,,_")
|
tags := []string{"%(objectname)", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"}
|
||||||
cmd := []string{"git", "for-each-ref", "--sort=taggerdate", "--format", format}
|
format := strings.Join(tags, "_,,,_")
|
||||||
// log.Info("RUNNING:", strings.Join(cmd, " "))
|
cmd := []string{"git", "for-each-ref", "--sort=taggerdate", "--format", format}
|
||||||
result := r.pb.RunQuiet(cmd)
|
// log.Info("RUNNING:", strings.Join(cmd, " "))
|
||||||
if result.Error != nil {
|
result := r.pb.RunQuiet(cmd)
|
||||||
log.Warn("git for-each-ref error:", result.Error)
|
if result.Error != nil {
|
||||||
}
|
log.Warn("git for-each-ref error:", result.Error)
|
||||||
for i, line := range result.Stdout {
|
}
|
||||||
log.Info(i, line)
|
for i, line := range result.Stdout {
|
||||||
}
|
log.Info(i, line)
|
||||||
|
}
|
||||||
|
|
||||||
if me.hideFunction == nil {
|
if me.hideFunction == nil {
|
||||||
// application didn't register a hide function
|
// application didn't register a hide function
|
||||||
// always show everything in that case
|
// always show everything in that case
|
||||||
r.Show()
|
r.Show()
|
||||||
} else {
|
} else {
|
||||||
me.hideFunction(r)
|
me.hideFunction(r)
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// print out whatever changes have happened
|
// print out whatever changes have happened
|
||||||
if c, ok := r.Status.Changed(); ok {
|
if c, ok := r.Status.Changed(); ok {
|
||||||
|
|
Loading…
Reference in New Issue