summaryrefslogtreecommitdiff
path: root/currentVersions.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-26 15:25:57 -0500
committerJeff Carr <[email protected]>2025-10-26 15:25:57 -0500
commit26f9c47ac64965275f3b0f001629aaac09ce5ae9 (patch)
treedc9835dd8351dd7fe027efaafdae3c7a39154953 /currentVersions.go
parent665427afe56dea738341ce350ba084858397d6ba (diff)
more on deb build versions
Diffstat (limited to 'currentVersions.go')
-rw-r--r--currentVersions.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/currentVersions.go b/currentVersions.go
index e4bccb1..8f727a9 100644
--- a/currentVersions.go
+++ b/currentVersions.go
@@ -117,6 +117,22 @@ func (repo *Repo) DebianReleaseVersion() string {
return newv
}
+// for comparison with the file versions in /var/lib/apt/lists/
+func (repo *Repo) GetSmartVersion() string {
+ curver := repo.GetCurrentBranchVersion()
+
+ // takes off the GO 'v'
+ curver = trimNonNumericFromStart(curver)
+ parts := strings.Split(curver, "-")
+ if len(parts) == 1 {
+ curver += "-0"
+ }
+ if len(parts) == 3 {
+ curver = strings.Join(parts[0:2], "-")
+ }
+ return "v" + curver
+}
+
func (repo *Repo) DebianCurrentVersion(buildnum int) string {
curver := repo.GetCurrentBranchVersion()