summaryrefslogtreecommitdiff
path: root/tablePackaging.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-08 01:23:12 -0500
committerJeff Carr <[email protected]>2025-10-08 01:23:12 -0500
commit1f321bc8c3b7bb19f443d73334c6cdcc45a9c75a (patch)
tree02e3b3d4209dc735d85ed04040a8af1cbf135aac /tablePackaging.go
parentfebcf44d5386f8fc20ab752f0416955f35375335 (diff)
usability cleanups
Diffstat (limited to 'tablePackaging.go')
-rw-r--r--tablePackaging.go39
1 files changed, 18 insertions, 21 deletions
diff --git a/tablePackaging.go b/tablePackaging.go
index 497a9d9..0da43b1 100644
--- a/tablePackaging.go
+++ b/tablePackaging.go
@@ -38,39 +38,29 @@ func getDebFilename(repo *gitpb.Repo) string {
return ""
}
-func shouldBuild(repo *gitpb.Repo) string {
- if repo.IsDirty() {
- return "no"
- }
- ver := repo.GetCurrentVersion()
- debname := getDebFilename(repo)
- if !debian.DebFilenameMatchesVersion(debname, ver) {
- return "yes"
- }
- if argv.All {
- return "yes"
- }
- return ""
+func printPackagingTable(pb *gitpb.Repos) {
+ tablePB := makePackagingTable(pb)
+ tablePB.PrintTable()
+ log.Printf("wit.packagingTable() %d repos\n", pb.Len())
}
-func printPackagingTable(pb *gitpb.Repos) {
+func makePackagingTable(pb *gitpb.Repos) *gitpb.ReposTable {
tablePB := pb.NewTable("deb details")
tablePB.NewUuid()
-
var col *gitpb.RepoFunc
- col = tablePB.AddNamespace()
- col.Width = 32
+ col = tablePB.AddFullPath()
+ col.Width = 56
col = tablePB.AddStringFunc("RepoType", func(r *gitpb.Repo) string {
return me.forge.GetRepoType(r)
})
col.Width = 8
- col = tablePB.AddStringFunc("Build Version", func(r *gitpb.Repo) string {
+ col = tablePB.AddStringFunc("new .deb Version", func(r *gitpb.Repo) string {
return me.forge.GetPackageVersion(r)
})
- col.Width = 12
+ col.Width = 16
/*
col = tablePB.AddStringFunc("is old", func(r *gitpb.Repo) string {
@@ -111,6 +101,14 @@ func printPackagingTable(pb *gitpb.Repos) {
})
col.Width = 4
+ col = tablePB.AddStringFunc("dirty", func(r *gitpb.Repo) string {
+ if r.IsDirty() {
+ return "yes"
+ }
+ return ""
+ })
+ col.Width = 5
+
col = tablePB.AddStringFunc("build", func(r *gitpb.Repo) string {
return shouldBuild(r)
})
@@ -128,6 +126,5 @@ func printPackagingTable(pb *gitpb.Repos) {
})
col.Width = -1
- tablePB.PrintTable()
- log.Printf("wit.packagingTable() %d repos\n", pb.Len())
+ return tablePB
}