Skip to content

Commit c0b743e

Browse files
committed
Added option to suppress generation of TC scripts.
1 parent c50e441 commit c0b743e

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/PostSharp.Engineering.BuildTools/Build/Model/Product.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ public DockerSpec? DockerSpec
210210
/// </summary>
211211
public Pattern ConsumableDepsFiles { get; init; } = Pattern.Empty;
212212

213+
/// <summary>
214+
/// Gets or sets a value indicating whether the <c>generate-scripts</c> command should the TeamCity setting scripts.
215+
/// </summary>
216+
public bool GenerateTeamCitySettings { get; init; } = true;
217+
213218
/// <summary>
214219
/// Gets or sets a value indicating whether the <c>prepare</c> command should generate the <c>nuget.config</c> file.
215220
/// </summary>

src/PostSharp.Engineering.BuildTools/ContinuousIntegration/GenerateScriptsCommand.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ public static bool Execute( BuildContext context, CommonCommandSettings settings
1919
var product = context.Product;
2020

2121
// TeamCity
22-
if ( !TeamCitySettingsFile.TryWrite( context, settings ) )
22+
if ( product.GenerateTeamCitySettings )
2323
{
24-
return false;
24+
if ( !TeamCitySettingsFile.TryWrite( context, settings ) )
25+
{
26+
return false;
27+
}
2528
}
2629

2730
EmbeddedResourceHelper.ExtractScript( context, "Build.ps1", "" );

0 commit comments

Comments
 (0)