3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-14 16:09:32 +01:00
ergo/irc/version.go
2020-08-30 02:29:21 -04:00

29 lines
666 B
Go

// Copyright (c) 2020 Shivaram Lingamneni
// Released under the MIT license
package irc
import "fmt"
const (
// SemVer is the semantic version of Oragono.
SemVer = "2.3.0-rc2"
)
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])
}
}