mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Update version imprinting (#1462)
* Add version tag constant * Update build imprinting
This commit is contained in:
parent
dbae85283f
commit
7048532bc4
2 changed files with 11 additions and 4 deletions
|
@ -12,10 +12,11 @@ const (
|
|||
VersionMajor = 0
|
||||
VersionMinor = 0
|
||||
VersionPatch = 0
|
||||
VersionTag = "" // example: "rc1"
|
||||
)
|
||||
|
||||
func VersionString() string {
|
||||
version := fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch)
|
||||
version := fmt.Sprintf("%d.%d.%d%s", VersionMajor, VersionMinor, VersionPatch, VersionTag)
|
||||
if branch != "" {
|
||||
version += fmt.Sprintf("-%s", branch)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue