diff --git a/cmd/settings.go b/cmd/settings.go index de70bb9..6405018 100644 --- a/cmd/settings.go +++ b/cmd/settings.go @@ -113,18 +113,33 @@ func (c *Config) loadCommandName() error { func (c *Config) loadProviders() error { // if version tag is given in image - javaImg := strings.TrimSuffix(JavaProviderImage, fmt.Sprintf(":%v", Version)) - updatedJavaImg := fmt.Sprintf("%v:%v", javaImg, Version) - err := os.Setenv("JAVA_PROVIDER_IMG", updatedJavaImg) - if err != nil { - return err + if os.Getenv("JAVA_PROVIDER_IMG") == "" { + javaImg := strings.TrimSuffix(JavaProviderImage, fmt.Sprintf(":%v", Version)) + updatedJavaImg := fmt.Sprintf("%v:%v", javaImg, Version) + err := os.Setenv("JAVA_PROVIDER_IMG", updatedJavaImg) + if err != nil { + return err + } } - // if version tag is given in image - genericImg := strings.TrimSuffix(GenericProviderImage, fmt.Sprintf(":%v", Version)) - updatedGenericImg := fmt.Sprintf("%v:%v", genericImg, Version) - err = os.Setenv("GENERIC_PROVIDER_IMG", updatedGenericImg) - if err != nil { - return err + + if os.Getenv("GENERIC_PROVIDER_IMG") == "" { + // if version tag is given in image + genericImg := strings.TrimSuffix(GenericProviderImage, fmt.Sprintf(":%v", Version)) + updatedGenericImg := fmt.Sprintf("%v:%v", genericImg, Version) + err := os.Setenv("GENERIC_PROVIDER_IMG", updatedGenericImg) + if err != nil { + return err + } + } + + if os.Getenv("DOTNET_PROVIDER_IMG") == "" { + // if version tag is given in image + dotnetImg := strings.TrimSuffix(DotnetProviderImage, fmt.Sprintf(":%v", Version)) + updatedDotnetImg := fmt.Sprintf("%v:%v", dotnetImg, Version) + err := os.Setenv("DOTNET_PROVIDER_IMG", updatedDotnetImg) + if err != nil { + return err + } } return nil diff --git a/cmd/version.go b/cmd/version.go index a379828..d485055 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -14,6 +14,7 @@ var ( JavaBundlesLocation = "/jdtls/java-analyzer-bundle/java-analyzer-bundle.core/target/java-analyzer-bundle.core-1.0.0-SNAPSHOT.jar" JavaProviderImage = "quay.io/konveyor/java-external-provider" GenericProviderImage = "quay.io/konveyor/generic-external-provider" + DotnetProviderImage = "quay.io/konveyor/dotnet-external-provider" ) // Use build flags to set correct Version and BuildCommit