diff --git a/main.go b/main.go index c85ab32..79a2107 100644 --- a/main.go +++ b/main.go @@ -24,7 +24,7 @@ import ( "os" "terraform-provider-solacebroker/cmd" "terraform-provider-solacebroker/internal/broker" - _ "terraform-provider-solacebroker/internal/broker/generated" + generated "terraform-provider-solacebroker/internal/broker/generated" "github.com/hashicorp/terraform-plugin-framework/providerserver" ) @@ -41,10 +41,11 @@ var ( ) func main() { - if broker.SempDetail.Platform != expectedPlatform { + if generated.Platform != expectedPlatform { fmt.Println(fmt.Sprintf("Provider error: wrong platform SEMP API spec \"%s\" used, expected \"%s\"", broker.SempDetail.Platform, expectedPlatform)) os.Exit(1) } + broker.RegisterSempVersionDetails(generated.BasePath, generated.SempVersion, generated.Platform) broker.ProviderVersion = version if len(os.Args) > 1 && (os.Args[1] == "generate" || os.Args[1] == "help" || os.Args[1] == "--help" || os.Args[1] == "-h" || os.Args[1] == "version") { err := cmd.Execute()