From 0fc8882e29e8a0ae891ca55f6930a33b1f7d96a2 Mon Sep 17 00:00:00 2001 From: Radek Simko Date: Sun, 21 Jun 2015 12:19:24 +0100 Subject: [PATCH] Expose Terraform version internally & externally --- terraform/version.go | 9 +++++++++ version.go | 11 ++++------- 2 files changed, 13 insertions(+), 7 deletions(-) create mode 100644 terraform/version.go diff --git a/terraform/version.go b/terraform/version.go new file mode 100644 index 000000000..7146a8807 --- /dev/null +++ b/terraform/version.go @@ -0,0 +1,9 @@ +package terraform + +// The main version number that is being run at the moment. +const Version = "0.6.0" + +// 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. +const VersionPrerelease = "dev" diff --git a/version.go b/version.go index 3ae4855ae..31b54445d 100644 --- a/version.go +++ b/version.go @@ -1,12 +1,9 @@ package main +import "github.com/hashicorp/terraform/terraform" + // The git commit that was compiled. This will be filled in by the compiler. var GitCommit string -// The main version number that is being run at the moment. -const Version = "0.6.0" - -// 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. -const VersionPrerelease = "dev" +const Version = terraform.Version +const VersionPrerelease = terraform.VersionPrerelease