2020-05-21 17:25:30 +02:00
|
|
|
// Copyright (c) 2020 Shivaram Lingamneni
|
|
|
|
// Released under the MIT license
|
|
|
|
|
|
|
|
package irc
|
|
|
|
|
|
|
|
import "fmt"
|
|
|
|
|
|
|
|
const (
|
|
|
|
// SemVer is the semantic version of Oragono.
|
2020-11-01 03:17:58 +01:00
|
|
|
SemVer = "2.4.0-rc1"
|
2020-05-21 17:25:30 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
|
|
|
// Ver is the full version of Oragono, used in responses to clients.
|
|
|
|
Ver = fmt.Sprintf("oragono-%s", SemVer)
|
|
|
|
// Commit is the full git hash, if available
|
|
|
|
Commit string
|
|
|
|
)
|
|
|
|
|
|
|
|
// initialize version strings (these are set in package main via linker flags)
|
|
|
|
func SetVersionString(version, commit string) {
|
|
|
|
Commit = commit
|
|
|
|
if version != "" {
|
|
|
|
Ver = fmt.Sprintf("oragono-%s", version)
|
|
|
|
} else if len(Commit) == 40 {
|
|
|
|
Ver = fmt.Sprintf("oragono-%s-%s", SemVer, Commit[:16])
|
|
|
|
}
|
|
|
|
}
|