6 "github.com/hashicorp/go-version"
9 // The main version number that is being run at the moment.
10 const Version = "0.9.8"
12 // A pre-release marker for the version. If this is "" (empty string)
13 // then it means that it is a final release. Otherwise, this is a pre-release
14 // such as "dev" (in development), "beta", "rc1", etc.
15 var VersionPrerelease = ""
17 // SemVersion is an instance of version.Version. This has the secondary
18 // benefit of verifying during tests and init time that our version is a
19 // proper semantic version, which should always be the case.
20 var SemVersion = version.Must(version.NewVersion(Version))
22 // VersionHeader is the header name used to send the current terraform version
24 const VersionHeader = "Terraform-Version"
26 func VersionString() string {
27 if VersionPrerelease != "" {
28 return fmt.Sprintf("%s-%s", Version, VersionPrerelease)