Skip to content

Commit fb6e497

Browse files
committed
Extracted ServiceMessageEscapeHelper out of DeleteHelper.cs
1 parent 1559716 commit fb6e497

File tree

3 files changed

+24
-20
lines changed

3 files changed

+24
-20
lines changed

GitVersionCore/GitVersionCore.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
<Compile Include="Helpers\FileSystem.cs" />
8585
<Compile Include="Helpers\IFileSystem.cs" />
8686
<Compile Include="Helpers\ProcessHelper.cs" />
87+
<Compile Include="Helpers\ServiceMessageEscapeHelper.cs" />
8788
<Compile Include="OutputVariables\VersionVariables.cs" />
8889
<Compile Include="Extensions\ExtensionMethods.git.cs" />
8990
<Compile Include="SemanticVersionExtensions.cs" />

GitVersionCore/Helpers/DeleteHelper.cs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,6 @@
22
{
33
using System.IO;
44

5-
public static class ServiceMessageEscapeHelper
6-
{
7-
public static string EscapeValue(string value)
8-
{
9-
if (value == null)
10-
{
11-
return null;
12-
}
13-
// List of escape values from http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity
14-
15-
value = value.Replace("|", "||");
16-
value = value.Replace("'", "|'");
17-
value = value.Replace("[", "|[");
18-
value = value.Replace("]", "|]");
19-
value = value.Replace("\r", "|r");
20-
value = value.Replace("\n", "|n");
21-
22-
return value;
23-
}
24-
}
255
public static class DeleteHelper
266
{
277
public static void DeleteGitRepository(string directory)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace GitVersion
2+
{
3+
public static class ServiceMessageEscapeHelper
4+
{
5+
public static string EscapeValue(string value)
6+
{
7+
if (value == null)
8+
{
9+
return null;
10+
}
11+
// List of escape values from http://confluence.jetbrains.com/display/TCD8/Build+Script+Interaction+with+TeamCity
12+
13+
value = value.Replace("|", "||");
14+
value = value.Replace("'", "|'");
15+
value = value.Replace("[", "|[");
16+
value = value.Replace("]", "|]");
17+
value = value.Replace("\r", "|r");
18+
value = value.Replace("\n", "|n");
19+
20+
return value;
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)