From b006b82a8f52a6e8598b1338a3da311f9c68e5cb Mon Sep 17 00:00:00 2001 From: Jeff Zellner Date: Wed, 1 Nov 2023 10:51:38 -0600 Subject: [PATCH] Jz/fix versioning (#136) * fix client versioning * set version via goreleaser --------- Co-authored-by: Jeff Zellner --- .goreleaser.yml | 2 +- CHANGELOG.md | 6 +++++- firehydrant/client.go | 11 ++--------- 3 files changed, 8 insertions(+), 11 deletions(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index a964a0aa..bf665be3 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -14,7 +14,7 @@ builds: flags: - -trimpath ldflags: - - '-s -w -X provider.Version={{.Version}} -X provider.Commit={{.Commit}}' + - '-s -w -X github.com/firehydrant/terraform-provider-firehydrant/firehydrant.Version={{.Version}}' goos: - freebsd - windows diff --git a/CHANGELOG.md b/CHANGELOG.md index 213a974e..41ba2119 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -## 0.3.6 (Unreleased) +## 0.3.7 (Unreleased) + +## 0.3.6 + +* Fix client versioning ## 0.3.5 diff --git a/firehydrant/client.go b/firehydrant/client.go index 81bd7258..ed6e7a2d 100644 --- a/firehydrant/client.go +++ b/firehydrant/client.go @@ -11,12 +11,8 @@ import ( ) const ( - // MajorVersion is the major version - MajorVersion = 0 - // MinorVersion is the minor version - MinorVersion = 1 - // PatchVersion is the patch version - PatchVersion = 4 + // Version is the semver of this provider + Version = "0.3.6" // UserAgentPrefix is the prefix of the User-Agent header that all terraform REST calls perform UserAgentPrefix = "firehydrant-terraform-provider" @@ -38,9 +34,6 @@ func checkResponseStatusCode(response *http.Response, apiError *APIError) error } } -// Version is the semver of this provider -var Version = fmt.Sprintf("%d.%d.%d", MajorVersion, MinorVersion, PatchVersion) - // APIClient is the client that accesses all of the api.firehydrant.io resources type APIClient struct { baseURL string