summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-05 03:14:27 -0600
committerJeff Carr <[email protected]>2024-11-05 03:14:27 -0600
commit44d221697fa9e5edd81ec99a7041c726d42ba034 (patch)
treed3861d29d9494c19b460b430bb22e60104af5596
parent9a1cc5839fb087cadfa02e00a9131dc5c73818c0 (diff)
show target version in the stdout report
Signed-off-by: Jeff Carr <[email protected]>
-rw-r--r--human.go13
-rw-r--r--scanIterator.go3
-rw-r--r--structs.go2
-rw-r--r--viewTempWindow.go8
4 files changed, 22 insertions, 4 deletions
diff --git a/human.go b/human.go
index ec2997c..cd322e7 100644
--- a/human.go
+++ b/human.go
@@ -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)
diff --git a/scanIterator.go b/scanIterator.go
index 482d16d..b021195 100644
--- a/scanIterator.go
+++ b/scanIterator.go
@@ -127,6 +127,9 @@ func (r *RepoList) selectUnmergedRepos() []*RepoRow {
if repo.State() == "PERFECT" {
continue
}
+ if repo.Status.Whitelist {
+ continue
+ }
if repo.Status.IsReleased() {
continue
}
diff --git a/structs.go b/structs.go
index 0758258..128426d 100644
--- a/structs.go
+++ b/structs.go
@@ -37,6 +37,8 @@ type RepoList struct {
shownCount *gui.Node
hideFunction func(*RepoRow)
duration *gui.Node
+
+ rows []*RepoRow
}
type RepoRow struct {
diff --git a/viewTempWindow.go b/viewTempWindow.go
index bd27506..402393c 100644
--- a/viewTempWindow.go
+++ b/viewTempWindow.go
@@ -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
}