Skip to content

Commit c149867

Browse files
committed
Bring back 2025.0 because the support will continue for a few months.
1 parent 92cdbe1 commit c149867

File tree

2 files changed

+219
-0
lines changed

2 files changed

+219
-0
lines changed
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
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 JetBrains.Annotations;
4+
using PostSharp.Engineering.BuildTools.ContinuousIntegration;
5+
using PostSharp.Engineering.BuildTools.ContinuousIntegration.Model;
6+
using PostSharp.Engineering.BuildTools.Dependencies.Model;
7+
using PostSharp.Engineering.BuildTools.Docker;
8+
using System;
9+
using System.IO;
10+
using System.Runtime.InteropServices.Marshalling;
11+
12+
namespace PostSharp.Engineering.BuildTools.Dependencies.Definitions;
13+
14+
public static partial class MetalamaDependencies
15+
{
16+
// ReSharper disable once InconsistentNaming
17+
18+
[PublicAPI]
19+
public static class V2025_0
20+
{
21+
private class MetalamaDependencyDefinition : DependencyDefinition
22+
{
23+
public MetalamaDependencyDefinition(
24+
string dependencyName,
25+
VcsProvider vcsProvider,
26+
MetalamaGitHubOrganization? organization,
27+
bool isVersioned = true,
28+
string? parentCiProjectId = null,
29+
string? customCiProjectName = null,
30+
string? customBranch = null,
31+
string? customReleaseBranch = null,
32+
string? customRepositoryName = null,
33+
bool pullRequestRequiresStatusCheck = true,
34+
string? vcsRootProjectId = null )
35+
: base(
36+
Family,
37+
dependencyName,
38+
customBranch ?? $"develop/{Family.Version}",
39+
customReleaseBranch ?? $"release/{Family.Version}",
40+
CreateMetalamaVcsRepository(
41+
customRepositoryName ?? dependencyName,
42+
vcsProvider,
43+
organization,
44+
customBranch == null && customReleaseBranch == null
45+
? null
46+
: $"DefaultBranch_{dependencyName.Replace( ".", "", StringComparison.Ordinal )}" ),
47+
TeamCityHelper.CreateConfiguration(
48+
parentCiProjectId == null
49+
? TeamCityHelper.GetProjectId( dependencyName, _projectName, Family.Version )
50+
: TeamCityHelper.GetProjectIdWithParentProjectId( dependencyName, parentCiProjectId ),
51+
isVersioned,
52+
pullRequestRequiresStatusCheck: pullRequestRequiresStatusCheck,
53+
vcsRootProjectId: vcsRootProjectId ),
54+
isVersioned ) { }
55+
}
56+
57+
public static ProductFamily Family { get; } = new( _projectName, "2025.0", DevelopmentDependencies.Family, PostSharpDependencies.V2025_0.Family )
58+
{
59+
DockerBaseImage = DockerImages.WindowsServerCore,
60+
61+
// Manual merging is required from-non merged repositories to 2025.1.
62+
63+
// UpstreamProductFamily = V2024_1.Family,
64+
// DownstreamProductFamily = V2025_1.Family
65+
};
66+
67+
public static DependencyDefinition Consolidated { get; } =
68+
new MetalamaDependencyDefinition(
69+
ProductFamily.ConsolidatedProjectName,
70+
VcsProvider.AzureDevOps,
71+
null,
72+
false,
73+
customRepositoryName: "Metalama.Consolidated" );
74+
75+
// The release build is intentionally used for the debug configuration because we want dependencies to consume the release
76+
// build, for performance reasons. The debug build will be used only locally, and for this we don't need a configuration here.
77+
public static DependencyDefinition MetalamaCompiler { get; } =
78+
new MetalamaDependencyDefinition(
79+
"Metalama.Compiler",
80+
VcsProvider.GitHub,
81+
MetalamaGitHubOrganization.Metalama )
82+
{
83+
EngineeringDirectory = "eng-Metalama",
84+
PrivateArtifactsDirectory = Path.Combine( "artifacts", "packages", "$(MSSBuildConfiguration)", "Shipping" )
85+
};
86+
87+
public static DependencyDefinition Metalama { get; } =
88+
new MetalamaDependencyDefinition(
89+
"Metalama",
90+
VcsProvider.GitHub,
91+
MetalamaGitHubOrganization.Metalama )
92+
{
93+
// SuppressUpstream = true
94+
};
95+
96+
public static DependencyDefinition MetalamaPremium { get; } =
97+
new MetalamaDependencyDefinition(
98+
"Metalama.Premium",
99+
VcsProvider.GitHub,
100+
MetalamaGitHubOrganization.Metalama )
101+
{
102+
// SuppressUpstream = true
103+
};
104+
105+
public static DependencyDefinition MetalamaVsx { get; } =
106+
new MetalamaDependencyDefinition(
107+
"Metalama.Vsx",
108+
VcsProvider.AzureDevOps,
109+
null );
110+
111+
public static DependencyDefinition MetalamaSamples { get; } =
112+
new MetalamaDependencyDefinition(
113+
"Metalama.Samples",
114+
VcsProvider.GitHub,
115+
MetalamaGitHubOrganization.Metalama ) { CodeStyle = "Metalama.Samples" };
116+
117+
public static DependencyDefinition TimelessDotNetEngineer { get; } =
118+
new MetalamaDependencyDefinition(
119+
"TimelessDotNetEngineer",
120+
VcsProvider.GitHub,
121+
MetalamaGitHubOrganization.PostSharp ) { CodeStyle = "Metalama.Samples" };
122+
123+
public static DependencyDefinition MetalamaCommunity { get; } =
124+
new MetalamaDependencyDefinition(
125+
"Metalama.Community",
126+
VcsProvider.GitHub,
127+
MetalamaGitHubOrganization.PostSharp );
128+
129+
public static DependencyDefinition MetalamaDocumentation { get; } =
130+
new MetalamaDependencyDefinition(
131+
"Metalama.Documentation",
132+
VcsProvider.GitHub,
133+
MetalamaGitHubOrganization.Metalama,
134+
false );
135+
136+
public static DependencyDefinition NopCommerce { get; } =
137+
new MetalamaDependencyDefinition(
138+
"Metalama.Tests.NopCommerce",
139+
VcsProvider.GitHub,
140+
MetalamaGitHubOrganization.PostSharp,
141+
false,
142+
parentCiProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}_MetalamaTests",
143+
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}",
144+
customBranch: $"dev/{Family.Version}" );
145+
146+
public static DependencyDefinition CargoSupport { get; } =
147+
new MetalamaDependencyDefinition(
148+
"Metalama.Tests.CargoSupport",
149+
VcsProvider.AzureDevOps,
150+
null,
151+
false,
152+
parentCiProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}_MetalamaTests",
153+
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}" );
154+
155+
public static DependencyDefinition DotNetSdkTests { get; } =
156+
new MetalamaDependencyDefinition(
157+
"Metalama.Tests.DotNetSdk",
158+
VcsProvider.GitHub,
159+
MetalamaGitHubOrganization.PostSharp,
160+
false,
161+
parentCiProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}_MetalamaTests",
162+
vcsRootProjectId: $"Metalama_Metalama{Family.VersionWithoutDots}" );
163+
164+
public static DependencyDefinition MetalamaPerformance { get; } =
165+
new MetalamaDependencyDefinition(
166+
"Metalama.Performance",
167+
VcsProvider.GitHub,
168+
MetalamaGitHubOrganization.PostSharp,
169+
false );
170+
}
171+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 JetBrains.Annotations;
4+
using PostSharp.Engineering.BuildTools.ContinuousIntegration;
5+
using PostSharp.Engineering.BuildTools.ContinuousIntegration.Model;
6+
using PostSharp.Engineering.BuildTools.Dependencies.Model;
7+
8+
namespace PostSharp.Engineering.BuildTools.Dependencies.Definitions;
9+
10+
public static partial class PostSharpDependencies
11+
{
12+
// ReSharper disable once InconsistentNaming
13+
14+
[PublicAPI]
15+
public static class V2025_0
16+
{
17+
private class PostSharpDependencyDefinition : DependencyDefinition
18+
{
19+
private static readonly TeamCityProjectId _teamCityProjectId = new(
20+
$"PostSharpGitHub_{_projectName}{Family.VersionWithoutDots}", "PostSharpGitHub" );
21+
22+
private static readonly string _distributionBuildId = $"{_teamCityProjectId}_BuildDistribution";
23+
24+
public PostSharpDependencyDefinition()
25+
: base(
26+
Family,
27+
"PostSharpPackage",
28+
$"refs/heads/release/{Family.Version}",
29+
null,
30+
new GitHubRepository( _projectName, _projectName ),
31+
new CiProjectConfiguration(
32+
_teamCityProjectId,
33+
new ConfigurationSpecific<string>( "not-used", _distributionBuildId, "not-used" ),
34+
null,
35+
null,
36+
TeamCityHelper.TeamCityCloudTokenEnvironmentVariableName,
37+
TeamCityHelper.TeamCityCloudUrl ),
38+
false )
39+
{
40+
this.EngineeringDirectory = @"Build\Distribution\eng";
41+
}
42+
}
43+
44+
public static ProductFamily Family { get; } = new( _projectName, "2025.0", DevelopmentDependencies.Family );
45+
46+
public static DependencyDefinition PostSharp { get; } = new PostSharpDependencyDefinition();
47+
}
48+
}

0 commit comments

Comments
 (0)