2015-03-20 00:27:52 -04:00
|
|
|
package version
|
|
|
|
|
|
2016-04-04 11:15:46 -07:00
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"strings"
|
|
|
|
|
)
|
2015-11-19 12:16:06 +01:00
|
|
|
|
2015-03-20 00:27:52 -04:00
|
|
|
var (
|
2015-07-17 18:02:02 -07:00
|
|
|
// Version should be updated by hand at each release
|
2016-07-27 13:38:07 -07:00
|
|
|
Version = "0.7.0"
|
2015-07-17 18:02:02 -07:00
|
|
|
|
|
|
|
|
// GitCommit will be overwritten automatically by the build system
|
|
|
|
|
GitCommit = "HEAD"
|
2015-03-20 00:27:52 -04:00
|
|
|
)
|
2015-11-19 12:16:06 +01:00
|
|
|
|
|
|
|
|
// FullVersion formats the version to be printed
|
|
|
|
|
func FullVersion() string {
|
2015-12-07 10:11:19 -08:00
|
|
|
return fmt.Sprintf("%s, build %s", Version, GitCommit)
|
2015-11-19 12:16:06 +01:00
|
|
|
}
|
2016-04-04 11:15:46 -07:00
|
|
|
|
|
|
|
|
// RC checks if the Machine version is a release candidate or not
|
|
|
|
|
func RC() bool {
|
|
|
|
|
return strings.Contains(Version, "rc")
|
|
|
|
|
}
|