Skip to content

Commit

Permalink
wip: teamcity default values
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Apr 2, 2024
1 parent 207d831 commit cff059e
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 12 deletions.
8 changes: 0 additions & 8 deletions .teamcity/settings.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,55 +37,47 @@ 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)
select (
"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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 0 additions & 3 deletions source/Nuke.Common/CI/TeamCity/TeamCityAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<object>().Select(x => x.ToString()).Join(valueSeparator)
: defaultValue?.ToString(),
Display = required ? TeamCityParameterDisplay.Prompt : TeamCityParameterDisplay.Normal,
AllowMultiple = memberType.IsArray && valueSet is not null,
ValueSeparator = valueSeparator
Expand Down

0 comments on commit cff059e

Please sign in to comment.