]> git.immae.eu Git - github/fretlink/terraform-provider-statuscake.git/blame - vendor/github.com/hashicorp/terraform/version/version.go
Upgrade to 0.12
[github/fretlink/terraform-provider-statuscake.git] / vendor / github.com / hashicorp / terraform / version / version.go
CommitLineData
15c0b25d
AP
1// The version package provides a location to set the release versions for all
2// packages to consume, without creating import cycles.
3//
4// This package should not import any other terraform packages.
5package version
6
7import (
8 "fmt"
9
10 version "github.com/hashicorp/go-version"
11)
12
13// The main version number that is being run at the moment.
107c1cdb 14var Version = "0.12.0"
15c0b25d
AP
15
16// A pre-release marker for the version. If this is "" (empty string)
17// then it means that it is a final release. Otherwise, this is a pre-release
18// such as "dev" (in development), "beta", "rc1", etc.
107c1cdb 19var Prerelease = ""
15c0b25d
AP
20
21// SemVer is an instance of version.Version. This has the secondary
22// benefit of verifying during tests and init time that our version is a
23// proper semantic version, which should always be the case.
107c1cdb
ND
24var SemVer *version.Version
25
26func init() {
27 SemVer = version.Must(version.NewVersion(Version))
28}
15c0b25d
AP
29
30// Header is the header name used to send the current terraform version
31// in http requests.
32const Header = "Terraform-Version"
33
34// String returns the complete version string, including prerelease
35func String() string {
36 if Prerelease != "" {
37 return fmt.Sprintf("%s-%s", Version, Prerelease)
38 }
39 return Version
40}