diff options
| author | Jeff Carr <[email protected]> | 2025-10-26 15:25:57 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-26 15:25:57 -0500 |
| commit | 26f9c47ac64965275f3b0f001629aaac09ce5ae9 (patch) | |
| tree | dc9835dd8351dd7fe027efaafdae3c7a39154953 | |
| parent | 665427afe56dea738341ce350ba084858397d6ba (diff) | |
more on deb build versions
| -rw-r--r-- | currentVersions.go | 16 |
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() |
