3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-15 00:19:29 +01:00
ergo/irc/version.go
Shivaram Lingamneni 654381071b
update version and changelog for v2.14.0-rc1 (#2164)
* changelog for v2.14.0-rc1

* bump version string for rc1

* bump irctest
2024-06-09 03:11:33 -04:00

29 lines
652 B
Go

// Copyright (c) 2020 Shivaram Lingamneni
// Released under the MIT license
package irc
import "fmt"
const (
// SemVer is the semantic version of Ergo.
SemVer = "2.14.0-rc1"
)
var (
// Ver is the full version of Ergo, used in responses to clients.
Ver = fmt.Sprintf("ergo-%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("ergo-%s", version)
} else if len(Commit) == 40 {
Ver = fmt.Sprintf("ergo-%s-%s", SemVer, Commit[:16])
}
}