include goversion used to compile mox in the mox version

This commit is contained in:
Mechiel Lukkien
2024-11-28 16:28:05 +01:00
parent 636bb91df6
commit d7f057709f
10 changed files with 19 additions and 15 deletions

View File

@ -19,7 +19,7 @@ func StoreLastKnown(v updates.Version) error {
// LastKnown returns the last known version that has been mentioned in an update
// email, or the current application.
func LastKnown() (current, lastknown updates.Version, mtime time.Time, rerr error) {
curv, curerr := updates.ParseVersion(moxvar.Version)
curv, curerr := updates.ParseVersion(moxvar.VersionBare)
p := DataDirPath("lastknownversion")
fi, _ := os.Stat(p)
@ -44,7 +44,7 @@ func LastKnown() (current, lastknown updates.Version, mtime time.Time, rerr erro
} else if lasterr == nil {
return curv, lastknown, mtime, nil
}
if moxvar.Version == "(devel)" {
if strings.HasPrefix(moxvar.Version, "(devel)") {
return curv, updates.Version{}, mtime, fmt.Errorf("development version")
}
return curv, updates.Version{}, mtime, fmt.Errorf("parsing version: %w", err)