Skip to content

Commit

Permalink
Merge pull request #395 from MusicDin/fix/release-version
Browse files Browse the repository at this point in the history
Use version variable which is overwritten by goreleaser
  • Loading branch information
simondeziel authored Dec 11, 2023
2 parents 6447eed + c690b10 commit f303648
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import (
"github.com/terraform-lxd/terraform-provider-lxd/internal/provider"
)

// version indicates provider's version. The appropriate value
// for the compile binary will be set by the goreleaser.
// See: https://goreleaser.com/cookbooks/using-main.version/
var version = "dev"

// Old main for SDKv2.
//
// func main() {
Expand All @@ -29,7 +34,7 @@ func main() {
ProtocolVersion: 6,
}

err := providerserver.Serve(context.Background(), provider.NewLxdProvider("dev", "10s"), opts)
err := providerserver.Serve(context.Background(), provider.NewLxdProvider(version, "10s"), opts)
if err != nil {
log.Fatal(err.Error())
}
Expand Down

0 comments on commit f303648

Please sign in to comment.