diff options
Diffstat (limited to 'currentVersions.go')
| -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() |
