dendrite/internal/version.go

44 lines
768 B
Go
Raw Normal View History

package internal
import (
"fmt"
"strings"
)
// the final version string
var version string
// -ldflags "-X github.com/matrix-org/dendrite/internal.branch=master"
var branch string
// -ldflags "-X github.com/matrix-org/dendrite/internal.build=alpha"
var build string
const (
VersionMajor = 0
v0.1.0 Squashed commit of the following: commit 570528e5f19d76fe2fd7ea646246eea9650b1b60 Author: Kegan Dougal <kegan@matrix.org> Date: Thu Oct 8 14:52:10 2020 +0100 v0.1.0 commit 02c020bced3be6d1a63e1001ab9c0ef6231ba087 Merge: db840f02 8035c50c Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Thu Oct 8 14:46:32 2020 +0100 Merge branch 'master' into v0.1.0 commit db840f025b5d7b7c7e1ba905646571cb03dd7b22 Merge: adc19a3d 78f6e1a3 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Thu Oct 8 13:31:36 2020 +0100 Merge branch 'master' into v0.1.0 commit adc19a3d5f0c9d5a85b3c1dd7d1772236fb8cc9b Merge: c8fc6855 3e12f6e9 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Thu Oct 8 10:31:58 2020 +0100 Merge branch 'master' into v0.1.0 commit c8fc68555c3607b0153d10df91d357d9603ccf90 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Wed Oct 7 18:41:04 2020 +0100 Version 0.1.0rc3 commit 15bf3851415dc21ebcfa98e0f2a5ec725034d6dd Merge: e7d9eea4 8bca7a83 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Wed Oct 7 18:39:25 2020 +0100 Merge branch 'master' into v0.1.0 commit e7d9eea4a09be7b05a87b1df2a9e87d3109e8fcc Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Oct 5 17:56:45 2020 +0100 v0.1.0rc2 commit 3fa76370f214e2ba3ec04f4c6f0f63d3baa273e7 Merge: f7cecdd9 52ddded7 Author: Neil Alexander <neilalexander@users.noreply.github.com> Date: Mon Oct 5 17:56:28 2020 +0100 Merge branch 'master' into v0.1.0 commit f7cecdd9a85fe2806a99e426b806832e7036da1e Author: Kegan Dougal <kegan@matrix.org> Date: Fri Oct 2 17:25:59 2020 +0100 Bump to 0.1.0rc1
2020-10-08 08:53:46 -05:00
VersionMinor = 1
VersionPatch = 0
VersionTag = "" // example: "rc1"
)
func VersionString() string {
return version
}
func init() {
version = fmt.Sprintf("%d.%d.%d", VersionMajor, VersionMinor, VersionPatch)
if VersionTag != "" {
version += "-" + VersionTag
}
parts := []string{}
if build != "" {
parts = append(parts, build)
}
if branch != "" {
parts = append(parts, branch)
}
if len(parts) > 0 {
version += "+" + strings.Join(parts, ".")
}
}