File tree 4 files changed +27
-25
lines changed
tools-local/tasks/Microsoft.DotNet.SourceBuild.Tasks
4 files changed +27
-25
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 44
44
<OrchestratedManifestBuildName >N/A</OrchestratedManifestBuildName >
45
45
</PropertyGroup >
46
46
47
+ <ItemGroup >
48
+ <ExtraPackageVersionPropsPackageInfo
49
+ Include ="
50
+ Microsoft.AspNetCore.All;
51
+ Microsoft.AspNetCore.App;
52
+ Microsoft.NET.Sdk.Razor"
53
+ Version =" 2.1.0-rc1-30682" />
54
+ </ItemGroup >
55
+
47
56
<ItemGroup >
48
57
<RepositoryReference Include =" application-insights" />
49
58
<RepositoryReference Include =" cli-migrate" />
Original file line number Diff line number Diff line change 157
157
<_PreviouslySourceBuiltPackages Include =" $(SourceBuiltPackagesPath)*.nupkg" />
158
158
</ItemGroup >
159
159
<WriteBuildOutputProps NuGetPackages =" @(_PreviouslySourceBuiltPackages)"
160
+ ExtraPackageInfo =" @(ExtraPackageVersionPropsPackageInfo)"
160
161
OutputPath =" $(PackageVersionPropsPath)" />
161
162
162
163
<ReadLinesFromFile File =" $(PackageVersionPropsPath)" >
Original file line number Diff line number Diff line change 6
6
using Microsoft . Build . Utilities ;
7
7
using NuGet . Packaging ;
8
8
using NuGet . Packaging . Core ;
9
+ using NuGet . Versioning ;
10
+ using System . Collections . Generic ;
9
11
using System . IO ;
10
12
using System . Linq ;
11
13
using System . Text ;
@@ -21,6 +23,20 @@ public class WriteBuildOutputProps : Task
21
23
[ Required ]
22
24
public string OutputPath { get ; set ; }
23
25
26
+ /// <summary>
27
+ /// Package id/versions to add to the build output props, which may not exist as nupkgs.
28
+ ///
29
+ /// %(Identity): Package identity.
30
+ /// %(Version): Package version.
31
+ /// </summary>
32
+ public ITaskItem [ ] ExtraPackageInfo { get ; set ; }
33
+
34
+ private IEnumerable < PackageIdentity > ExtraPackageIdentities => ExtraPackageInfo
35
+ ? . Select ( item => new PackageIdentity (
36
+ item . GetMetadata ( "Identity" ) ,
37
+ NuGetVersion . Parse ( item . GetMetadata ( "Version" ) ) ) )
38
+ ?? Enumerable . Empty < PackageIdentity > ( ) ;
39
+
24
40
public override bool Execute ( )
25
41
{
26
42
PackageIdentity [ ] latestPackages = NuGetPackages
@@ -31,6 +47,7 @@ public override bool Execute()
31
47
return reader . GetIdentity ( ) ;
32
48
}
33
49
} )
50
+ . Concat ( ExtraPackageIdentities )
34
51
. GroupBy ( identity => identity . Id )
35
52
. Select ( g => g . OrderBy ( id => id . Version ) . Last ( ) )
36
53
. OrderBy ( id => id . Id )
You can’t perform that action at this time.
0 commit comments