From cff059eff45dfc343c8252b800a227ba0854ba7b Mon Sep 17 00:00:00 2001 From: Matthias Koch Date: Tue, 2 Apr 2024 23:47:01 +0200 Subject: [PATCH] wip: teamcity default values --- .teamcity/settings.kts | 8 -------- .../Configuration/TeamCityConfigurationParameter.cs | 3 ++- source/Nuke.Common/CI/TeamCity/TeamCityAttribute.cs | 3 --- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.teamcity/settings.kts b/.teamcity/settings.kts index 62b866404..5b01b6ba8 100644 --- a/.teamcity/settings.kts +++ b/.teamcity/settings.kts @@ -37,47 +37,40 @@ project { checkbox ( "env.AutoStash", label = "AutoStash", - value = "True", checked = "True", unchecked = "False", display = ParameterDisplay.NORMAL) select ( "env.Configuration", label = "Configuration", - value = "Release", options = listOf("Debug" to "Debug", "Release" to "Release"), display = ParameterDisplay.NORMAL) checkbox ( "env.IgnoreFailedSources", label = "IgnoreFailedSources", description = "Ignore unreachable sources during Restore", - value = "False", checked = "True", unchecked = "False", display = ParameterDisplay.NORMAL) checkbox ( "env.Major", label = "Major", - value = "False", checked = "True", unchecked = "False", display = ParameterDisplay.NORMAL) text ( "env.SignPathSettings", label = "SignPathSettings", - value = "", allowEmpty = true, display = ParameterDisplay.NORMAL) text ( "env.TestDegreeOfParallelism", label = "TestDegreeOfParallelism", - value = "1", allowEmpty = true, display = ParameterDisplay.NORMAL) checkbox ( "env.UseHttps", label = "UseHttps", - value = "False", checked = "True", unchecked = "False", display = ParameterDisplay.NORMAL) @@ -85,7 +78,6 @@ project { "env.Verbosity", label = "Verbosity", description = "Logging verbosity during build execution. Default is 'Normal'.", - value = "Normal", options = listOf("Minimal" to "Minimal", "Normal" to "Normal", "Quiet" to "Quiet", "Verbose" to "Verbose"), display = ParameterDisplay.NORMAL) text( diff --git a/source/Nuke.Common/CI/TeamCity/Configuration/TeamCityConfigurationParameter.cs b/source/Nuke.Common/CI/TeamCity/Configuration/TeamCityConfigurationParameter.cs index a17de2830..53cc0e5df 100644 --- a/source/Nuke.Common/CI/TeamCity/Configuration/TeamCityConfigurationParameter.cs +++ b/source/Nuke.Common/CI/TeamCity/Configuration/TeamCityConfigurationParameter.cs @@ -33,7 +33,8 @@ public override void Write(CustomFileWriter writer) if (Description != null) writer.WriteLine($"description = {Description.DoubleQuote()},"); - writer.WriteLine($"value = {DefaultValue.DoubleQuote()},"); + if (DefaultValue != null) + writer.WriteLine($"value = {DefaultValue.DoubleQuote()},"); if (Type == TeamCityParameterType.Checkbox) { diff --git a/source/Nuke.Common/CI/TeamCity/TeamCityAttribute.cs b/source/Nuke.Common/CI/TeamCity/TeamCityAttribute.cs index d0a9c59df..a15675db9 100644 --- a/source/Nuke.Common/CI/TeamCity/TeamCityAttribute.cs +++ b/source/Nuke.Common/CI/TeamCity/TeamCityAttribute.cs @@ -302,9 +302,6 @@ TeamCityParameterType GetParameterType() Description = attribute.Description, Options = valueSet?.ToDictionary(x => x.Item1, x => x.Item2), Type = GetParameterType(), - DefaultValue = memberType.IsArray && defaultValue is IEnumerable enumerable - ? enumerable.Cast().Select(x => x.ToString()).Join(valueSeparator) - : defaultValue?.ToString(), Display = required ? TeamCityParameterDisplay.Prompt : TeamCityParameterDisplay.Normal, AllowMultiple = memberType.IsArray && valueSet is not null, ValueSeparator = valueSeparator