diff --git a/Makefile b/Makefile
index 4a504ec66..354a7cbc4 100644
--- a/Makefile
+++ b/Makefile
@@ -42,13 +42,13 @@ generate::
go generate ./pkg/codegen/docs/
build::
- go install -ldflags "-X github.com/pulumi/pulumi/sdk/go/common/version.Version=${VERSION}" ${PROJECT}
+ go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
install::
- GOBIN=$(PULUMI_BIN) go install -ldflags "-X github.com/pulumi/pulumi/sdk/go/common/version.Version=${VERSION}" ${PROJECT}
+ GOBIN=$(PULUMI_BIN) go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
dist::
- go install -ldflags "-X github.com/pulumi/pulumi/sdk/go/common/version.Version=${VERSION}" ${PROJECT}
+ go install -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" ${PROJECT}
lint::
for DIR in "examples" "pkg" "sdk" "tests" ; do \
diff --git a/build.proj b/build.proj
index c1622837e..47e01cadb 100644
--- a/build.proj
+++ b/build.proj
@@ -66,7 +66,7 @@
-
+
@@ -76,7 +76,7 @@
-
@@ -101,7 +101,7 @@
-
+
@@ -111,7 +111,7 @@
-
@@ -148,7 +148,7 @@
-
+
@@ -163,7 +163,7 @@
-
@@ -221,7 +221,7 @@
-
+
@@ -241,7 +241,7 @@
-
@@ -255,7 +255,7 @@
-
diff --git a/main.go b/main.go
index bd13f31dc..94eab481d 100644
--- a/main.go
+++ b/main.go
@@ -21,8 +21,8 @@ import (
"runtime/debug"
"github.com/pulumi/pulumi/pkg/cmd"
+ "github.com/pulumi/pulumi/pkg/version"
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
- "github.com/pulumi/pulumi/sdk/go/common/version"
)
func panicHandler() {
diff --git a/pkg/backend/httpstate/client/api.go b/pkg/backend/httpstate/client/api.go
index 0408b8de1..d67b08961 100644
--- a/pkg/backend/httpstate/client/api.go
+++ b/pkg/backend/httpstate/client/api.go
@@ -34,11 +34,11 @@ import (
"github.com/pkg/errors"
"github.com/pulumi/pulumi/pkg/util/tracing"
+ "github.com/pulumi/pulumi/pkg/version"
"github.com/pulumi/pulumi/sdk/go/common/apitype"
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
"github.com/pulumi/pulumi/sdk/go/common/util/httputil"
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
- "github.com/pulumi/pulumi/sdk/go/common/version"
)
const (
diff --git a/pkg/backend/snapshot.go b/pkg/backend/snapshot.go
index 9eb0cbf42..72161d299 100644
--- a/pkg/backend/snapshot.go
+++ b/pkg/backend/snapshot.go
@@ -23,10 +23,10 @@ import (
"github.com/pulumi/pulumi/pkg/engine"
"github.com/pulumi/pulumi/pkg/resource/deploy"
"github.com/pulumi/pulumi/pkg/secrets"
+ "github.com/pulumi/pulumi/pkg/version"
"github.com/pulumi/pulumi/sdk/go/common/resource"
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
- "github.com/pulumi/pulumi/sdk/go/common/version"
)
// SnapshotPersister is an interface implemented by our backends that implements snapshot
diff --git a/pkg/backend/snapshot_test.go b/pkg/backend/snapshot_test.go
index 4a0928e74..992acaa0f 100644
--- a/pkg/backend/snapshot_test.go
+++ b/pkg/backend/snapshot_test.go
@@ -23,9 +23,9 @@ import (
"github.com/pulumi/pulumi/pkg/resource/deploy"
"github.com/pulumi/pulumi/pkg/secrets"
"github.com/pulumi/pulumi/pkg/secrets/b64"
+ "github.com/pulumi/pulumi/pkg/version"
"github.com/pulumi/pulumi/sdk/go/common/resource"
"github.com/pulumi/pulumi/sdk/go/common/tokens"
- "github.com/pulumi/pulumi/sdk/go/common/version"
)
type MockRegisterResourceEvent struct {
diff --git a/pkg/cmd/pulumi.go b/pkg/cmd/pulumi.go
index bf22fd2c9..9f4a3ea9e 100644
--- a/pkg/cmd/pulumi.go
+++ b/pkg/cmd/pulumi.go
@@ -39,13 +39,13 @@ import (
"github.com/pulumi/pulumi/pkg/backend/filestate"
"github.com/pulumi/pulumi/pkg/backend/httpstate"
"github.com/pulumi/pulumi/pkg/backend/httpstate/client"
+ "github.com/pulumi/pulumi/pkg/version"
"github.com/pulumi/pulumi/sdk/go/common/diag"
"github.com/pulumi/pulumi/sdk/go/common/diag/colors"
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
"github.com/pulumi/pulumi/sdk/go/common/util/contract"
"github.com/pulumi/pulumi/sdk/go/common/util/httputil"
"github.com/pulumi/pulumi/sdk/go/common/util/logging"
- "github.com/pulumi/pulumi/sdk/go/common/version"
"github.com/pulumi/pulumi/sdk/go/common/workspace"
)
diff --git a/pkg/cmd/version.go b/pkg/cmd/version.go
index d5d317477..44c663e9f 100644
--- a/pkg/cmd/version.go
+++ b/pkg/cmd/version.go
@@ -17,8 +17,8 @@ package cmd
import (
"fmt"
+ "github.com/pulumi/pulumi/pkg/version"
"github.com/pulumi/pulumi/sdk/go/common/util/cmdutil"
- "github.com/pulumi/pulumi/sdk/go/common/version"
"github.com/spf13/cobra"
)
diff --git a/pkg/resource/deploy/plan_test.go b/pkg/resource/deploy/plan_test.go
index 3c3e21b8d..9d07b7462 100644
--- a/pkg/resource/deploy/plan_test.go
+++ b/pkg/resource/deploy/plan_test.go
@@ -6,10 +6,10 @@ import (
"github.com/pulumi/pulumi/pkg/secrets/b64"
+ "github.com/pulumi/pulumi/pkg/version"
"github.com/pulumi/pulumi/sdk/go/common/resource"
"github.com/pulumi/pulumi/sdk/go/common/resource/plugin"
"github.com/pulumi/pulumi/sdk/go/common/tokens"
- "github.com/pulumi/pulumi/sdk/go/common/version"
"github.com/stretchr/testify/assert"
)
diff --git a/pkg/resource/edit/operations_test.go b/pkg/resource/edit/operations_test.go
index 000281c7f..0a264266f 100644
--- a/pkg/resource/edit/operations_test.go
+++ b/pkg/resource/edit/operations_test.go
@@ -22,9 +22,9 @@ import (
"github.com/pulumi/pulumi/pkg/resource/deploy"
"github.com/pulumi/pulumi/pkg/resource/deploy/providers"
+ "github.com/pulumi/pulumi/pkg/version"
"github.com/pulumi/pulumi/sdk/go/common/resource"
"github.com/pulumi/pulumi/sdk/go/common/tokens"
- "github.com/pulumi/pulumi/sdk/go/common/version"
"github.com/stretchr/testify/assert"
)
diff --git a/pkg/version/version.go b/pkg/version/version.go
new file mode 100644
index 000000000..1d17f3874
--- /dev/null
+++ b/pkg/version/version.go
@@ -0,0 +1,18 @@
+// Copyright 2016-2018, Pulumi Corporation.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package version
+
+// Version is initialized by the Go linker to contain the semver of this build.
+var Version string
diff --git a/scripts/make_release.ps1 b/scripts/make_release.ps1
index 5ffe863f5..90383a4bb 100644
--- a/scripts/make_release.ps1
+++ b/scripts/make_release.ps1
@@ -13,7 +13,7 @@ $PublishTargets = @($GitHash, $Version, $Branch)
function RunGoBuild($goPackage) {
$binRoot = New-Item -ItemType Directory -Force -Path "$PublishDir\bin"
$outputName = Split-Path -Leaf $(go list -f "{{.Target}}" $goPackage)
- go build -ldflags "-X github.com/pulumi/pulumi/sdk/go/common/version.Version=$Version" -o "$binRoot\$outputName" $goPackage
+ go build -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=$Version" -o "$binRoot\$outputName" $goPackage
}
function CopyPackage($pathToModule, $moduleName) {
diff --git a/scripts/make_release.sh b/scripts/make_release.sh
index 829baf741..ca442a1a4 100755
--- a/scripts/make_release.sh
+++ b/scripts/make_release.sh
@@ -25,7 +25,7 @@ run_go_build() {
mkdir -p "${PUBDIR}/bin"
go build \
- -ldflags "-X github.com/pulumi/pulumi/sdk/go/common/version.Version=${VERSION}" \
+ -ldflags "-X github.com/pulumi/pulumi/pkg/version.Version=${VERSION}" \
-o "${PUBDIR}/bin/${output_name}${bin_suffix}" \
"$1"
}