Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate version to its own package #2448

Merged
merged 1 commit into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ builds:
flags:
- -trimpath
ldflags:
- '-s -w -X github.com/scaleway/terraform-provider-scaleway/v2/scaleway.version={{.Version}}'
- '-s -w -X github.com/scaleway/terraform-provider-scaleway/v2/version.Version={{.Version}}'
goos:
- freebsd
- windows
Expand Down
3 changes: 2 additions & 1 deletion scaleway/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import (
"github.com/scaleway/terraform-provider-scaleway/v2/internal/locality/regional"
"github.com/scaleway/terraform-provider-scaleway/v2/internal/locality/zonal"
"github.com/scaleway/terraform-provider-scaleway/v2/internal/transport"
"github.com/scaleway/terraform-provider-scaleway/v2/version"
)

const appendUserAgentEnvVar = "TF_APPEND_USER_AGENT"
Expand Down Expand Up @@ -363,7 +364,7 @@ func buildMeta(ctx context.Context, config *metaConfig) (*Meta, error) {
// Create scaleway SDK client
////
opts := []scw.ClientOption{
scw.WithUserAgent(customizeUserAgent(version, config.terraformVersion)),
scw.WithUserAgent(customizeUserAgent(version.Version, config.terraformVersion)),
scw.WithProfile(profile),
}

Expand Down
4 changes: 0 additions & 4 deletions scaleway/version.go

This file was deleted.

4 changes: 4 additions & 0 deletions version/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package version

// Version is set by go releaser on release
var Version = "develop"