summaryrefslogtreecommitdiff
path: root/tablePackaging.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-07 12:49:17 -0500
committerJeff Carr <[email protected]>2025-10-07 12:49:17 -0500
commit9cea97eba7242d179c997999b2fac957912e5cd1 (patch)
tree1c30b9040d9272f24b33260c38a34b023d36962b /tablePackaging.go
parent525b609a1c88689f990d3fa30282c160dd475302 (diff)
maybe it'll build and publish and make .debsv0.1.21
Diffstat (limited to 'tablePackaging.go')
-rw-r--r--tablePackaging.go28
1 files changed, 16 insertions, 12 deletions
diff --git a/tablePackaging.go b/tablePackaging.go
index 02922e2..497a9d9 100644
--- a/tablePackaging.go
+++ b/tablePackaging.go
@@ -38,6 +38,21 @@ 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 := pb.NewTable("deb details")
tablePB.NewUuid()
@@ -97,18 +112,7 @@ func printPackagingTable(pb *gitpb.Repos) {
col.Width = 4
col = tablePB.AddStringFunc("build", func(r *gitpb.Repo) string {
- if r.IsDirty() {
- return "no"
- }
- ver := r.GetCurrentVersion()
- debname := getDebFilename(r)
- if !debian.DebFilenameMatchesVersion(debname, ver) {
- return "yes"
- }
- if argv.All {
- return "yes"
- }
- return ""
+ return shouldBuild(r)
})
col.Width = 5