From 26f9c47ac64965275f3b0f001629aaac09ce5ae9 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 26 Oct 2025 15:25:57 -0500 Subject: more on deb build versions --- currentVersions.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'currentVersions.go') 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() -- cgit v1.2.3