Skip to content

Commit

Permalink
Jz/fix versioning (#136)
Browse files Browse the repository at this point in the history
* fix client versioning

* set version via goreleaser

---------

Co-authored-by: Jeff Zellner <[email protected]>
  • Loading branch information
Jeff Zellner and Jeff Zellner authored Nov 1, 2023
1 parent 7401e33 commit b006b82
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## 0.3.6 (Unreleased)
## 0.3.7 (Unreleased)

## 0.3.6

* Fix client versioning

## 0.3.5

Expand Down
11 changes: 2 additions & 9 deletions firehydrant/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit b006b82

Please sign in to comment.