Skip to content

Commit cdc47a1

Browse files
committed
Fixing system types. Increased timeout for Docker preparation step.
1 parent 6472da9 commit cdc47a1

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

src/PostSharp.Engineering.BuildTools/ContinuousIntegration/Model/BuildSteps/TeamCityEngineeringPrepareImageBuildStep.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
// Copyright (c) SharpCrafters s.r.o. See the LICENSE.md file in the root directory of this repository root for details.
2+
3+
using System;
4+
15
namespace PostSharp.Engineering.BuildTools.ContinuousIntegration.Model.BuildSteps;
26

37
public class TeamCityEngineeringPrepareImageBuildStep : TeamCityPowerShellBuildStep
@@ -13,5 +17,6 @@ public TeamCityEngineeringPrepareImageBuildStep(
1317
$"DockerBuild.ps1",
1418
$"-BuildImage -ImageName {dockerSpec.ImageName}" )
1519
{
20+
this.TimeOut = TimeSpan.FromHours( 2 );
1621
}
1722
}

src/PostSharp.Engineering.BuildTools/ContinuousIntegration/Model/BuildSteps/TeamCityPowerShellBuildStep.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
// Copyright (c) SharpCrafters s.r.o. See the LICENSE.md file in the root directory of this repository root for details.
22

3+
using System;
34
using System.IO;
45

56
namespace PostSharp.Engineering.BuildTools.ContinuousIntegration.Model.BuildSteps;
67

78
public class TeamCityPowerShellBuildStep : TeamCityBuildStep
89
{
910
public string Id { get; }
10-
11+
1112
public string Name { get; }
1213

1314
public string ScriptPath { get; }
@@ -16,6 +17,8 @@ public class TeamCityPowerShellBuildStep : TeamCityBuildStep
1617

1718
public string? WorkingDirectory { get; init; }
1819

20+
public TimeSpan? TimeOut { get; init; }
21+
1922
public TeamCityPowerShellBuildStep( string id, string name, string scriptPath, string scriptArguments )
2023
{
2124
this.Id = id;
@@ -25,14 +28,19 @@ public TeamCityPowerShellBuildStep( string id, string name, string scriptPath, s
2528
}
2629

2730
public override string GenerateTeamCityCode()
28-
=> $@" powerShell {{
31+
{
32+
var parameters = this.TimeOut != null ? $"param(\"TimeOut\", \"{this.TimeOut}\")" : "";
33+
34+
return $@" powerShell {{
2935
name = ""{this.Name}""
3036
id = ""{this.Id}""{(this.WorkingDirectory == null ? "" : $@"
3137
workingDir = ""{this.WorkingDirectory.Replace( Path.DirectorySeparatorChar, '/' )}""")}
38+
{parameters}
3239
scriptMode = file {{
3340
path = ""{this.ScriptPath}""
3441
}}
3542
noProfile = false
3643
scriptArgs = ""{this.ScriptArguments}""
3744
}}";
45+
}
3846
}

src/PostSharp.Engineering.Sdk/assets/system-types/CallerArgumentExpressionAttribute.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
// Refer to LICENSE.md in the repository root for complete details.
44

55
#if !NETCOREAPP
6-
using JetBrains.Annotations;
7-
86
// ReSharper disable once CheckNamespace
97
namespace System.Runtime.CompilerServices;
108

@@ -16,7 +14,6 @@ public CallerArgumentExpressionAttribute( string parameterName )
1614
this.ParameterName = parameterName;
1715
}
1816

19-
[UsedImplicitly]
2017
public string ParameterName { get; }
2118
}
2219

src/PostSharp.Engineering.Sdk/assets/system-types/InterpolatedStringHandlerArgumentAttribute.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,9 @@
33
// Refer to LICENSE.md in the repository root for complete details.
44

55
#if !NET6_0_OR_GREATER
6-
using JetBrains.Annotations;
7-
86
// ReSharper disable once CheckNamespace
97
namespace System.Runtime.CompilerServices;
108

11-
[PublicAPI]
129
[AttributeUsage( AttributeTargets.Parameter )]
1310
public sealed class InterpolatedStringHandlerArgumentAttribute : Attribute
1411
{

0 commit comments

Comments
 (0)