Skip to content

Commit 3625d42

Browse files
committed
Merge branch 'develop/2023.2' of https://github.com/postsharp/PostSharp.Engineering into develop/2023.2
# Conflicts: # src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2025_0.cs # src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2025_1.cs # src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2025_2.cs
2 parents d4b8caf + 3815de8 commit 3625d42

12 files changed

+255
-139
lines changed

eng/MainVersion.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<MainVersion>2023.2.172</MainVersion>
3+
<MainVersion>2023.2.178</MainVersion>
44
<PackageVersionSuffix></PackageVersionSuffix>
55
</PropertyGroup>
66
</Project>

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

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@ public bool TryGetBranchFromBuildNumber( ConsoleHelper console, CiBuildId buildI
9393

9494
branch = build.Attribute( "branchName" )!.Value;
9595

96-
const string prefix = "refs/heads/";
97-
98-
if ( branch.StartsWith( prefix, StringComparison.OrdinalIgnoreCase ) )
99-
{
100-
branch = branch.Substring( prefix.Length );
101-
}
102-
10396
if ( string.IsNullOrEmpty( branch ) )
10497
{
10598
console.WriteError( $"Cannot determine the branch of '{buildId}': the branch name is empty." );
@@ -150,11 +143,10 @@ IEnumerable<DownloadedFile> GetFiles( string urlOrPath, string targetDirectory )
150143
.ToArray();
151144

152145
IEnumerable<(string Name, string Url, long Size)> files = artifacts
153-
.Select(
154-
a => (
155-
a.Name,
156-
a.Element.Element( "content" )?.Attribute( "href" )?.Value,
157-
long.Parse( a.Element.Attribute( "size" )?.Value ?? "0", NumberStyles.Integer, CultureInfo.InvariantCulture )) )
146+
.Select( a => (
147+
a.Name,
148+
a.Element.Element( "content" )?.Attribute( "href" )?.Value,
149+
long.Parse( a.Element.Attribute( "size" )?.Value ?? "0", NumberStyles.Integer, CultureInfo.InvariantCulture )) )
158150
.Where( a => a.Value != null )
159151
.Select( a => (a.Name, a.Value!, a.Item3) );
160152

@@ -347,10 +339,13 @@ private bool TryGetDetails( ConsoleHelper console, string path )
347339

348340
public bool TryGetProjectDetails( ConsoleHelper console, string id ) => this.TryGetDetails( console, $"/app/rest/projects/id:{id}" );
349341

350-
public bool TryGetOrderedSubprojectsRecursively( ConsoleHelper console, string projectId, [NotNullWhen( true )] out IReadOnlyList<(string Id, string Name)>? subprojects )
342+
public bool TryGetOrderedSubprojectsRecursively(
343+
ConsoleHelper console,
344+
string projectId,
345+
[NotNullWhen( true )] out IReadOnlyList<(string Id, string Name)>? subprojects )
351346
{
352347
subprojects = null;
353-
348+
354349
if ( !this.TryGet( $"/app/rest/projects/id:{projectId}", console, out var projectResponse ) )
355350
{
356351
return false;
@@ -362,7 +357,7 @@ public bool TryGetOrderedSubprojectsRecursively( ConsoleHelper console, string p
362357
projectRootElement.Element( "projects" )!.Attribute( "count" )!.Value,
363358
NumberStyles.Integer,
364359
CultureInfo.InvariantCulture );
365-
360+
366361
var subprojectsList = new List<(string, string)>();
367362

368363
if ( expectedCount > 0 )
@@ -419,13 +414,16 @@ public bool TryGetOrderedSubprojectsRecursively( ConsoleHelper console, string p
419414
{
420415
throw new InvalidOperationException( "Not all subprojects have been retrieved." );
421416
}
422-
417+
423418
subprojects = subprojectsList.ToImmutableArray();
424419

425420
return true;
426421
}
427422

428-
public bool TryGetProjectsBuildConfigurations( ConsoleHelper console, string projectId, [NotNullWhen( true )] out ImmutableArray<string>? buildConfigurations )
423+
public bool TryGetProjectsBuildConfigurations(
424+
ConsoleHelper console,
425+
string projectId,
426+
[NotNullWhen( true )] out ImmutableArray<string>? buildConfigurations )
429427
{
430428
int? expectedCount = null;
431429
buildConfigurations = null;
@@ -442,7 +440,10 @@ public bool TryGetProjectsBuildConfigurations( ConsoleHelper console, string pro
442440

443441
var buildConfigurationsRootsElement = buildConfigurationsResponse.Content.ReadAsXDocument().Root!;
444442

445-
var newExpectedCount = int.Parse( buildConfigurationsRootsElement.Attribute( "count" )!.Value, NumberStyles.Integer, CultureInfo.InvariantCulture );
443+
var newExpectedCount = int.Parse(
444+
buildConfigurationsRootsElement.Attribute( "count" )!.Value,
445+
NumberStyles.Integer,
446+
CultureInfo.InvariantCulture );
446447

447448
if ( expectedCount == null )
448449
{
@@ -476,8 +477,11 @@ public bool TryGetProjectsBuildConfigurations( ConsoleHelper console, string pro
476477

477478
return true;
478479
}
479-
480-
public bool TryGetBuildConfigurationsSnapshotDependencies( ConsoleHelper console, string buildConfigurationId, [NotNullWhen( true )] out ImmutableArray<string>? snapshotDependencies )
480+
481+
public bool TryGetBuildConfigurationsSnapshotDependencies(
482+
ConsoleHelper console,
483+
string buildConfigurationId,
484+
[NotNullWhen( true )] out ImmutableArray<string>? snapshotDependencies )
481485
{
482486
int? expectedCount = null;
483487
snapshotDependencies = null;
@@ -494,7 +498,10 @@ public bool TryGetBuildConfigurationsSnapshotDependencies( ConsoleHelper console
494498

495499
var snapshotDependenciesRootsElement = snapshotDependenciesResponse.Content.ReadAsXDocument().Root!;
496500

497-
var newExpectedCount = int.Parse( snapshotDependenciesRootsElement.Attribute( "count" )!.Value, NumberStyles.Integer, CultureInfo.InvariantCulture );
501+
var newExpectedCount = int.Parse(
502+
snapshotDependenciesRootsElement.Attribute( "count" )!.Value,
503+
NumberStyles.Integer,
504+
CultureInfo.InvariantCulture );
498505

499506
if ( expectedCount == null )
500507
{
@@ -528,7 +535,7 @@ public bool TryGetBuildConfigurationsSnapshotDependencies( ConsoleHelper console
528535

529536
return true;
530537
}
531-
538+
532539
public bool TryCreateProject( ConsoleHelper console, string name, string id, string? parentId = null )
533540
{
534541
parentId ??= "_Root";

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2025_0.cs

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,11 @@ public MetalamaDependencyDefinition(
5252
isVersioned ) { }
5353
}
5454

55-
public static ProductFamily Family { get; } = new( _projectName, "2025.0", DevelopmentDependencies.Family, PostSharpDependencies.V2025_0_GitHub.Family )
55+
public static ProductFamily Family { get; } = new( _projectName, "2025.0", DevelopmentDependencies.Family, PostSharpDependencies.V2025_0.Family )
5656
{
57-
DownstreamProductFamily = V2025_1.Family
57+
// Downstream merge to 2025.1 is disabled because of repo merge.
58+
// UpstreamProductFamily = V2024_2.Family,
59+
// DownstreamProductFamily = V2025_1.Family
5860
};
5961

6062
public static DependencyDefinition MetalamaBackstage { get; } =
@@ -87,10 +89,7 @@ public MetalamaDependencyDefinition(
8789
new MetalamaDependencyDefinition(
8890
"Metalama.Framework.RunTime",
8991
VcsProvider.GitHub,
90-
MetalamaGitHubOrganization.PostSharp )
91-
{
92-
// SuppressDownstream = true
93-
};
92+
MetalamaGitHubOrganization.PostSharp );
9493

9594
public static DependencyDefinition MetalamaFrameworkPrivate { get; } =
9695
new MetalamaDependencyDefinition(
@@ -101,21 +100,14 @@ public MetalamaDependencyDefinition(
101100
pullRequestRequiresStatusCheck: false )
102101
{
103102
GenerateSnapshotDependency = false
104-
105-
// SuppressDownstream = true
106103
};
107104

108105
public static DependencyDefinition Metalama { get; } =
109106
new MetalamaDependencyDefinition(
110107
"Metalama",
111108
VcsProvider.GitHub,
112109
MetalamaGitHubOrganization.PostSharp,
113-
customRepositoryName: "Metalama.Framework" )
114-
{
115-
GenerateSnapshotDependency = false
116-
117-
// SuppressDownstream = true
118-
};
110+
customRepositoryName: "Metalama.Framework" );
119111

120112
public static DependencyDefinition MetalamaVsx { get; } =
121113
new MetalamaDependencyDefinition(
@@ -127,10 +119,7 @@ public MetalamaDependencyDefinition(
127119
new MetalamaDependencyDefinition(
128120
"Metalama.Extensions",
129121
VcsProvider.GitHub,
130-
MetalamaGitHubOrganization.PostSharp )
131-
{
132-
// SuppressDownstream = true
133-
};
122+
MetalamaGitHubOrganization.PostSharp );
134123

135124
public static DependencyDefinition MetalamaSamples { get; } =
136125
new MetalamaDependencyDefinition(
@@ -148,19 +137,13 @@ public MetalamaDependencyDefinition(
148137
new MetalamaDependencyDefinition(
149138
"Metalama.Migration",
150139
VcsProvider.GitHub,
151-
MetalamaGitHubOrganization.PostSharp )
152-
{
153-
// SuppressDownstream = true
154-
};
140+
MetalamaGitHubOrganization.PostSharp );
155141

156142
public static DependencyDefinition MetalamaLinqPad { get; } =
157143
new MetalamaDependencyDefinition(
158144
"Metalama.LinqPad",
159145
VcsProvider.GitHub,
160-
MetalamaGitHubOrganization.PostSharp )
161-
{
162-
// SuppressDownstream = true
163-
};
146+
MetalamaGitHubOrganization.PostSharp );
164147

165148
public static DependencyDefinition MetalamaCommunity { get; } =
166149
new MetalamaDependencyDefinition(
@@ -179,10 +162,7 @@ public MetalamaDependencyDefinition(
179162
new MetalamaDependencyDefinition(
180163
"Metalama.Patterns",
181164
VcsProvider.GitHub,
182-
MetalamaGitHubOrganization.PostSharp )
183-
{
184-
// SuppressDownstream = true
185-
};
165+
MetalamaGitHubOrganization.PostSharp );
186166

187167
public static DependencyDefinition NopCommerce { get; } =
188168
new MetalamaDependencyDefinition(

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaDependencies.V2025_1.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,10 @@ public MetalamaDependencyDefinition(
5353
isVersioned ) { }
5454
}
5555

56-
public static ProductFamily Family { get; } = new( _projectName, "2025.1", DevelopmentDependencies.Family, PostSharpDependencies.V2025_1_GitHub.Family )
56+
public static ProductFamily Family { get; } = new( _projectName, "2025.1", DevelopmentDependencies.Family, PostSharpDependencies.V2025_1.Family )
5757
{
58-
UpstreamProductFamily = V2025_0.Family
59-
60-
// DownstreamProductFamily = V2025_2.Family
58+
// UpstreamProductFamily = V2025_0.Family,
59+
DownstreamProductFamily = V2025_2.Family
6160
};
6261

6362
public static DependencyDefinition Consolidated { get; } =

0 commit comments

Comments
 (0)