Skip to content

Commit 1ce0304

Browse files
committed
Revert "Rename."
This reverts commit b695030.
1 parent 15299f1 commit 1ce0304

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

  • src/PostSharp.Engineering.BuildTools/ContinuousIntegration/Model

src/PostSharp.Engineering.BuildTools/ContinuousIntegration/Model/ArtifactRule.cs

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44

55
namespace PostSharp.Engineering.BuildTools.ContinuousIntegration.Model;
66

7-
/// <summary>
8-
///
9-
/// </summary>
10-
/// <param name="SourcePath">The directory in the source repository.</param>
11-
/// <param name="ArtifactPath">The directory in the artifacts.</param>
12-
/// <param name="Exclude"></param>
13-
/// <param name="IsAbsolute"></param>
14-
/// <param name="AllFiles">Whether the <c>/**/*</c> suffix is appended.</param>
15-
public record ArtifactRule( string SourcePath, string ArtifactPath, bool Exclude = false, bool IsAbsolute = false, bool AllFiles = true ) : IComparable<ArtifactRule>
7+
public record ArtifactRule( string Source, string Target, bool Exclude = false, bool IsAbsolute = false, bool AllFiles = true ) : IComparable<ArtifactRule>
168
{
179
internal string GetPublishRule( string checkoutDirectory )
1810
{
@@ -21,19 +13,19 @@ internal string GetPublishRule( string checkoutDirectory )
2113

2214
if ( this.IsAbsolute )
2315
{
24-
return $"{prefix}:{this.SourcePath}{suffix} => {this.ArtifactPath}";
16+
return $"{prefix}:{this.Source}{suffix} => {this.Target}";
2517
}
2618
else
2719
{
28-
return $"{prefix}:{checkoutDirectory}/{this.SourcePath}{suffix} => {this.ArtifactPath}";
20+
return $"{prefix}:{checkoutDirectory}/{this.Source}{suffix} => {this.Target}";
2921
}
3022
}
3123

3224
internal string GetRestoreRule( string checkoutDirectory )
3325
{
3426
var sign = this.Exclude ? "-" : "+";
3527

36-
return $"{sign}:{this.ArtifactPath}/**/* => {checkoutDirectory}/{this.SourcePath}";
28+
return $"{sign}:{this.Target}/**/* => {checkoutDirectory}/{this.Source}";
3729
}
3830

3931
public int CompareTo( ArtifactRule? other )
@@ -53,14 +45,14 @@ public int CompareTo( ArtifactRule? other )
5345
return 1;
5446
}
5547

56-
var sourceComparison = string.Compare( this.SourcePath, other.SourcePath, StringComparison.Ordinal );
48+
var sourceComparison = string.Compare( this.Source, other.Source, StringComparison.Ordinal );
5749

5850
if ( sourceComparison != 0 )
5951
{
6052
return sourceComparison;
6153
}
6254

63-
var targetComparison = string.Compare( this.ArtifactPath, other.ArtifactPath, StringComparison.Ordinal );
55+
var targetComparison = string.Compare( this.Target, other.Target, StringComparison.Ordinal );
6456

6557
if ( targetComparison != 0 )
6658
{

0 commit comments

Comments
 (0)