show target version in the stdout report

Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
Jeff Carr 2024-11-05 03:14:27 -06:00
parent 9a1cc5839f
commit 44d221697f
4 changed files with 22 additions and 4 deletions

View File

@ -18,12 +18,16 @@ func (r *RepoRow) StandardHeader() string {
gitAge, _ := tag.GetDate()
dur := time.Since(gitAge)
target := r.Status.GetTargetVersion()
master := r.Status.GetMasterVersion()
devel := r.Status.GetDevelVersion()
user := r.Status.GetUserVersion()
header := fmt.Sprintf("%-35s %5s %-20s %-20s %-20s %-20s %-15s",
r.Name(), shell.FormatDuration(dur), lastTag, master, devel, user, r.State())
header := fmt.Sprintf("%-35s %5s %-12s %-12s %-20s %-20s %-20s %-15s",
r.Name(), shell.FormatDuration(dur),
lastTag, target,
master, devel, user,
r.State())
return header
}
@ -36,9 +40,10 @@ func msg(w http.ResponseWriter, s string) {
func (v *RepoList) PrintReport(w http.ResponseWriter, readonly string, onlydirty string, perfect string) {
var count int
header := fmt.Sprintf("%-35s %5s %-20s %-20s %-20s %-20s %-15s",
header := fmt.Sprintf("%-35s %5s %-12s %-12s %-20s %-20s %-20s %-15s",
"REPO", "AGE",
"LAST", "MASTER", "DEVEL", "USER",
"LAST", "TARGET",
"MASTER", "DEVEL", "USER",
"STATE")
msg(w, header)

View File

@ -127,6 +127,9 @@ func (r *RepoList) selectUnmergedRepos() []*RepoRow {
if repo.State() == "PERFECT" {
continue
}
if repo.Status.Whitelist {
continue
}
if repo.Status.IsReleased() {
continue
}

View File

@ -37,6 +37,8 @@ type RepoList struct {
shownCount *gui.Node
hideFunction func(*RepoRow)
duration *gui.Node
rows []*RepoRow
}
type RepoRow struct {

View File

@ -32,6 +32,13 @@ func TempWindowView(parent *gui.Node) *RepoList {
return tmp
}
func (r *RepoList) ListRows() {
for i, row := range r.rows {
log.Warn("i, row:", i, row.Status.Name(), "curname", row.Status.GetCurrentBranchName())
row.currentName.SetLabel(row.Status.GetCurrentBranchName())
}
}
func (r *RepoList) ShowRepo(repo *RepoRow) error {
// this is the gui grid. all the widgets get added here
// at the end we tell the grid go to NextRow()
@ -84,5 +91,6 @@ func (r *RepoList) ShowRepo(repo *RepoRow) error {
newRow.hidden = false
r.reposgrid.NextRow()
r.rows = append(r.rows, newRow)
return nil
}