diff options
| author | Jeff Carr <[email protected]> | 2024-11-29 02:01:43 -0600 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2024-11-29 02:01:43 -0600 |
| commit | c672ab70da1b1398dd5fd93a21afaa6f6c089bc3 (patch) | |
| tree | 506519ee823d230ca95f99301b369291d3ef845f /scan.go | |
| parent | 7d5786782cff69a431d9f6c75fa94a23c90805f0 (diff) | |
show devel and user versions
Diffstat (limited to 'scan.go')
| -rw-r--r-- | scan.go | 54 |
1 files changed, 31 insertions, 23 deletions
@@ -58,32 +58,40 @@ func (r *RepoRow) NewScan() int { } } -// r.masterVersion.SetLabel(r.pb.GetMasterVersion()) -// r.develVersion.SetLabel(r.pb.GetDevelVersion()) -// r.userVersion.SetLabel(r.pb.GetUserVersion()) -// 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, "_,,,_") - cmd := []string{"git", "for-each-ref", "--sort=taggerdate", "--format", format} - // log.Info("RUNNING:", strings.Join(cmd, " ")) - result := r.pb.RunQuiet(cmd) - if result.Error != nil { - log.Warn("git for-each-ref error:", result.Error) + if r.masterVersion == nil { + panic("what the fuck node") } - for i, line := range result.Stdout { - log.Info(i, line) + if r.pb == nil { + panic("what the fuck pb") } + 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()) - if me.hideFunction == nil { - // application didn't register a hide function - // always show everything in that case - r.Show() - } else { - me.hideFunction(r) - } + /* + tags := []string{"%(objectname)", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"} + format := strings.Join(tags, "_,,,_") + cmd := []string{"git", "for-each-ref", "--sort=taggerdate", "--format", format} + // log.Info("RUNNING:", strings.Join(cmd, " ")) + result := r.pb.RunQuiet(cmd) + if result.Error != nil { + log.Warn("git for-each-ref error:", result.Error) + } + for i, line := range result.Stdout { + log.Info(i, line) + } + + if me.hideFunction == nil { + // application didn't register a hide function + // always show everything in that case + r.Show() + } else { + me.hideFunction(r) + } + */ // print out whatever changes have happened if c, ok := r.Status.Changed(); ok { |
