Skip to content

Commit 90825ce

Browse files
MetalamaVsx: link to Metalama parent family; GenerateScripts: error on unfetched deps
1 parent dd36a37 commit 90825ce

3 files changed

Lines changed: 19 additions & 2 deletions

File tree

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
using PostSharp.Engineering.BuildTools.Build;
55
using PostSharp.Engineering.BuildTools.Build.Files;
66
using PostSharp.Engineering.BuildTools.ContinuousIntegration.TeamCity.Generation;
7+
using PostSharp.Engineering.BuildTools.Dependencies.Model;
78
using PostSharp.Engineering.BuildTools.Docker;
89
using PostSharp.Engineering.BuildTools.Utilities;
10+
using System.Linq;
911

1012
namespace PostSharp.Engineering.BuildTools.ContinuousIntegration;
1113

@@ -61,6 +63,21 @@ public static bool Execute( BuildContext context, CommonCommandSettings settings
6163
return false;
6264
}
6365

66+
// Writing DockerMounts.g.ps1 needs a resolved VersionFile for every non-feed dependency.
67+
// We do not fetch automatically here; the user is expected to have run 'dependencies fetch' first.
68+
var unfetched = dependenciesOverrideFile.Dependencies
69+
.Where( d => d.Value.SourceKind != DependencySourceKind.Feed && d.Value.VersionFile == null )
70+
.Select( d => d.Key )
71+
.ToList();
72+
73+
if ( unfetched.Count > 0 )
74+
{
75+
context.Console.WriteError(
76+
$"Cannot generate scripts: dependencies have not been fetched: {string.Join( ", ", unfetched )}. Run './Build.ps1 dependencies fetch' first." );
77+
78+
return false;
79+
}
80+
6481
if ( !dependenciesOverrideFile.TryWrite( context ) )
6582
{
6683
return false;

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaVsxDependencies.V2026_0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public MetalamaVsxDependencyDefinition(
5252
isVersioned ) { }
5353
}
5454

55-
public static ProductFamily Family { get; } = new( _projectName, "2026.0", DevelopmentDependencies.Family )
55+
public static ProductFamily Family { get; } = new( _projectName, "2026.0", DevelopmentDependencies.Family, MetalamaDependencies.V2026_0.Family )
5656
{
5757
// No UpstreamProductFamily - breaking downstream merge from 2025.1
5858
// DownstreamProductFamily = V2026_1.Family

src/PostSharp.Engineering.BuildTools/Dependencies/Definitions/MetalamaVsxDependencies.V2026_1.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public MetalamaVsxDependencyDefinition(
5252
isVersioned ) { }
5353
}
5454

55-
public static ProductFamily Family { get; } = new( _projectName, "2026.1", DevelopmentDependencies.Family )
55+
public static ProductFamily Family { get; } = new( _projectName, "2026.1", DevelopmentDependencies.Family, MetalamaDependencies.V2026_1.Family )
5656
{
5757
UpstreamProductFamily = V2026_0.Family
5858

0 commit comments

Comments
 (0)