From bf4d804d617d7f5f017cd9dd3028d49a89d6fc99 Mon Sep 17 00:00:00 2001 From: Rival Abdrakhmanov Date: Mon, 9 Dec 2024 13:06:35 +0100 Subject: [PATCH] Use core tools `v4` path from the settings for the `v0` `AzureFunctionsVersion` property --- .../azure-toolkit-for-rider/CHANGELOG.md | 4 ++++ .../coreTools/FunctionCoreToolsManager.kt | 16 ++++++++++++---- .../azure-toolkit-for-rider/gradle.properties | 2 +- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/CHANGELOG.md b/PluginsAndFeatures/azure-toolkit-for-rider/CHANGELOG.md index c38134ee57..122a31d7cf 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/CHANGELOG.md +++ b/PluginsAndFeatures/azure-toolkit-for-rider/CHANGELOG.md @@ -4,6 +4,10 @@ ## [Unreleased] +### Fixed + +- Use core tools `v4` path from the settings for the `v0` `AzureFunctionsVersion` property ([RIDER-120285](https://youtrack.jetbrains.com/issue/RIDER-120285)) + ## [4.3.6] - 2024-12-09 ### Fixed diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/coreTools/FunctionCoreToolsManager.kt b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/coreTools/FunctionCoreToolsManager.kt index d6be424fc9..6ced9c15d8 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/coreTools/FunctionCoreToolsManager.kt +++ b/PluginsAndFeatures/azure-toolkit-for-rider/azure-intellij-plugin-appservice-dotnet/src/main/kotlin/com/microsoft/azure/toolkit/intellij/legacy/function/coreTools/FunctionCoreToolsManager.kt @@ -57,10 +57,18 @@ class FunctionCoreToolsManager { fun getFunctionCoreToolsPathForVersion(azureFunctionsVersion: String): Path? { val settings = AzureFunctionSettings.getInstance() val coreToolsPathEntries = settings.azureCoreToolsPathEntries - val coreToolsPathFromSettings = coreToolsPathEntries - .firstOrNull { it.functionsVersion.equals(azureFunctionsVersion, ignoreCase = true) } - ?.coreToolsPath - ?.let(::resolveCoreToolsPathFromSettings) + val coreToolsPathFromSettings = + if (azureFunctionsVersion.equals("v0", true)) { + coreToolsPathEntries + .firstOrNull { it.functionsVersion.equals("v4", ignoreCase = true) } + ?.coreToolsPath + ?.let(::resolveCoreToolsPathFromSettings) + } else { + coreToolsPathEntries + .firstOrNull { it.functionsVersion.equals(azureFunctionsVersion, ignoreCase = true) } + ?.coreToolsPath + ?.let(::resolveCoreToolsPathFromSettings) + } if (coreToolsPathFromSettings?.exists() == true) { LOG.trace { "Get Azure Function core tools path from the settings: $coreToolsPathFromSettings" } return coreToolsPathFromSettings diff --git a/PluginsAndFeatures/azure-toolkit-for-rider/gradle.properties b/PluginsAndFeatures/azure-toolkit-for-rider/gradle.properties index 5158b5d58a..d7fc4f4dee 100644 --- a/PluginsAndFeatures/azure-toolkit-for-rider/gradle.properties +++ b/PluginsAndFeatures/azure-toolkit-for-rider/gradle.properties @@ -4,7 +4,7 @@ pluginGroup = com.jetbrains pluginName = azure-toolkit-for-rider pluginRepositoryUrl = https://github.com/JetBrains/azure-tools-for-intellij # SemVer format -> https://semver.org -pluginVersion = 4.3.6 +pluginVersion = 4.3.7 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild = 243