diff options
Diffstat (limited to 'tablePackaging.go')
| -rw-r--r-- | tablePackaging.go | 28 |
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 |
