Skip to content

Commit b695030

Browse files
committed
Rename.
1 parent fd35d3e commit b695030

File tree

1 file changed

+14
-6
lines changed
  • src/PostSharp.Engineering.BuildTools/ContinuousIntegration/Model

1 file changed

+14
-6
lines changed

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

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

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

7-
public record ArtifactRule( string Source, string Target, bool Exclude = false, bool IsAbsolute = false, bool AllFiles = true ) : IComparable<ArtifactRule>
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>
816
{
917
internal string GetPublishRule( string checkoutDirectory )
1018
{
@@ -13,19 +21,19 @@ internal string GetPublishRule( string checkoutDirectory )
1321

1422
if ( this.IsAbsolute )
1523
{
16-
return $"{prefix}:{this.Source}{suffix} => {this.Target}";
24+
return $"{prefix}:{this.SourcePath}{suffix} => {this.ArtifactPath}";
1725
}
1826
else
1927
{
20-
return $"{prefix}:{checkoutDirectory}/{this.Source}{suffix} => {this.Target}";
28+
return $"{prefix}:{checkoutDirectory}/{this.SourcePath}{suffix} => {this.ArtifactPath}";
2129
}
2230
}
2331

2432
internal string GetRestoreRule( string checkoutDirectory )
2533
{
2634
var sign = this.Exclude ? "-" : "+";
2735

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

3139
public int CompareTo( ArtifactRule? other )
@@ -45,14 +53,14 @@ public int CompareTo( ArtifactRule? other )
4553
return 1;
4654
}
4755

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

5058
if ( sourceComparison != 0 )
5159
{
5260
return sourceComparison;
5361
}
5462

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

5765
if ( targetComparison != 0 )
5866
{

0 commit comments

Comments
 (0)