From 4d68c218e28b70d8d9a6d2a037b5ddcc54bc3896 Mon Sep 17 00:00:00 2001 From: "Dmitry.Tretyakov" Date: Thu, 21 Jul 2016 20:33:58 +0300 Subject: [PATCH] Fix dotnet publish command --- .../buildServer/dotnet/dotnet/PublishArgumentsProvider.kt | 2 +- .../dotnet/test/DotnetRunnerBuildServiceTest.kt | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/dotnet/dotnet/PublishArgumentsProvider.kt b/plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/dotnet/dotnet/PublishArgumentsProvider.kt index 5b8e11d26..2b141f1a5 100644 --- a/plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/dotnet/dotnet/PublishArgumentsProvider.kt +++ b/plugin-dotnet-agent/src/main/kotlin/jetbrains/buildServer/dotnet/dotnet/PublishArgumentsProvider.kt @@ -52,7 +52,7 @@ class PublishArgumentsProvider : ArgumentsProvider { } val tempValue = parameters[DotnetConstants.PARAM_PUBLISH_TEMP] - if (!outputValue.isNullOrBlank()) { + if (!tempValue.isNullOrBlank()) { arguments.add("--build-base-path") arguments.add(tempValue!!.trim()) } diff --git a/plugin-dotnet-agent/src/test/kotlin/jetbrains/buildServer/dotnet/test/DotnetRunnerBuildServiceTest.kt b/plugin-dotnet-agent/src/test/kotlin/jetbrains/buildServer/dotnet/test/DotnetRunnerBuildServiceTest.kt index eb7e41dec..035058146 100644 --- a/plugin-dotnet-agent/src/test/kotlin/jetbrains/buildServer/dotnet/test/DotnetRunnerBuildServiceTest.kt +++ b/plugin-dotnet-agent/src/test/kotlin/jetbrains/buildServer/dotnet/test/DotnetRunnerBuildServiceTest.kt @@ -96,7 +96,12 @@ class DotnetRunnerBuildServiceTest { arrayOf(mapOf( Pair(DotnetConstants.PARAM_PUBLISH_RUNTIME, "active"), Pair(DotnetConstants.PARAM_PUBLISH_NO_BUILD, "true")), - listOf("publish", "--runtime", "active", "--no-build"))) + listOf("publish", "--runtime", "active", "--no-build")), + + arrayOf(mapOf( + Pair(DotnetConstants.PARAM_PUBLISH_OUTPUT, "out"), + Pair(DotnetConstants.PARAM_PUBLISH_CONFIG, "Release")), + listOf("publish", "--configuration", "Release", "--output", "out"))) } @DataProvider