diff --git a/.goreleaser.yml b/.goreleaser.yml index e9a21f7c0..1f22162a5 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -16,7 +16,7 @@ builds: - amd64 binary: hcloud-cloud-controller-manager ldflags: - - "-s -w -X hcloud.providerVersion={{ if not .IsSnapshot }}v{{ end }}{{ .Version }}" + - "-s -w -X github.com/hetznercloud/hcloud-cloud-controller-manager/hcloud.providerVersion={{ if not .IsSnapshot }}v{{ end }}{{ .Version }}" archives: - id: deployment-yamls diff --git a/hcloud/cloud.go b/hcloud/cloud.go index fc547c540..c8e2b3e92 100644 --- a/hcloud/cloud.go +++ b/hcloud/cloud.go @@ -52,9 +52,11 @@ const ( hcloudMetricsAddress = ":8233" nodeNameENVVar = "NODE_NAME" providerName = "hcloud" - providerVersion = "v1.9.1" ) +// providerVersion is set by the build process using -ldflags -X +var providerVersion = "unknown" + type cloud struct { client *hcloud.Client instances *instances