core: use codified default for prerelease string

This commit is contained in:
Jake Champlin 2017-05-22 11:28:15 -04:00
parent bd68789006
commit 91ab75991d
No known key found for this signature in database
GPG Key ID: DC31F41958EF4AC2
2 changed files with 3 additions and 3 deletions

View File

@ -40,11 +40,11 @@ fi
export CGO_ENABLED=0
# Allow LD_FLAGS to be appended during development compilations
LD_FLAGS="-X main.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -X github.com/hashicorp/terraform/terraform.VersionPrerelease=dev $LD_FLAGS"
LD_FLAGS="-X main.GitCommit=${GIT_COMMIT}${GIT_DIRTY} $LD_FLAGS"
# In release mode we don't want debug information in the binary
if [[ -n "${TF_RELEASE}" ]]; then
LD_FLAGS="-X main.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -s -w"
LD_FLAGS="-X main.GitCommit=${GIT_COMMIT}${GIT_DIRTY} -X github.com/hashicorp/terraform/terraform.VersionPrerelease= -s -w"
fi
# Build!

View File

@ -12,7 +12,7 @@ const Version = "0.9.6"
// 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
// such as "dev" (in development), "beta", "rc1", etc.
var VersionPrerelease string
var VersionPrerelease = "dev"
// SemVersion is an instance of version.Version. This has the secondary
// benefit of verifying during tests and init time that our version is a