Incrementing version

This commit is contained in:
Mike Farah 2018-06-20 14:29:10 +10:00
parent fb87f638f2
commit d46d555b07
2 changed files with 7 additions and 2 deletions

View File

@ -16,7 +16,7 @@ var (
// VersionPrerelease is a pre-release marker for the version. If this is "" (empty string) // VersionPrerelease is a pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release // then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc. // such as "dev" (in development), "beta", "rc1", etc.
VersionPrerelease = "beta" VersionPrerelease = ""
) )
// ProductName is the name of the product // ProductName is the name of the product

View File

@ -3,13 +3,18 @@ package main
import "testing" import "testing"
func TestGetVersionDisplay(t *testing.T) { func TestGetVersionDisplay(t *testing.T) {
var expectedVersion = ProductName + " version " + Version
if VersionPrerelease != "" {
expectedVersion = expectedVersion + "-" + VersionPrerelease
}
expectedVersion = expectedVersion + "\n"
tests := []struct { tests := []struct {
name string name string
want string want string
}{ }{
{ {
name: "Display Version", name: "Display Version",
want: ProductName + " version " + Version + "-" + VersionPrerelease + "\n", want: expectedVersion,
}, },
} }
for _, tt := range tests { for _, tt := range tests {