mirror of
https://github.com/jeremyd/ergo.git
synced 2026-07-02 06:48:55 -07:00
tweak version strings again
This commit is contained in:
@@ -5,20 +5,7 @@
|
||||
|
||||
package irc
|
||||
|
||||
import "fmt"
|
||||
|
||||
const (
|
||||
// SemVer is the semantic version of Oragono.
|
||||
SemVer = "2.1.0-unreleased"
|
||||
)
|
||||
|
||||
var (
|
||||
// Commit is the current git commit.
|
||||
Commit = ""
|
||||
|
||||
// Ver is the full version of Oragono, used in responses to clients.
|
||||
Ver = fmt.Sprintf("oragono-%s", SemVer)
|
||||
|
||||
// maxLastArgLength is used to simply cap off the final argument when creating general messages where we need to select a limit.
|
||||
// for instance, in MONITOR lists, RPL_ISUPPORT lists, etc.
|
||||
maxLastArgLength = 400
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
// Copyright (c) 2020 Shivaram Lingamneni
|
||||
// Released under the MIT license
|
||||
|
||||
package irc
|
||||
|
||||
import "fmt"
|
||||
|
||||
const (
|
||||
// SemVer is the semantic version of Oragono.
|
||||
SemVer = "2.1.0-unreleased"
|
||||
)
|
||||
|
||||
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])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user