88using Cake . Common . Tools . DotNet . Workload . Install ;
99using Cake . Core ;
1010using Cake . Core . IO ;
11+ using System . Linq ;
1112
1213namespace BenchmarkDotNet . Build . Runners ;
1314
@@ -20,6 +21,34 @@ public BuildRunner(BuildContext context)
2021 this . context = context ;
2122 }
2223
24+ public void PackWeaver ( )
25+ {
26+ var weaverPath = context . AllPackableSrcProjects . Single ( p => p . GetFilename ( ) == "BenchmarkDotNet.Weaver.csproj" ) ;
27+
28+ context . DotNetRestore ( weaverPath . GetDirectory ( ) . FullPath ,
29+ new DotNetRestoreSettings
30+ {
31+ MSBuildSettings = context . MsBuildSettingsRestore
32+ } ) ;
33+
34+ context . Information ( "BuildSystemProvider: " + context . BuildSystem ( ) . Provider ) ;
35+ context . DotNetBuild ( weaverPath . FullPath , new DotNetBuildSettings
36+ {
37+ NoRestore = true ,
38+ DiagnosticOutput = true ,
39+ MSBuildSettings = context . MsBuildSettingsBuild ,
40+ Configuration = context . BuildConfiguration ,
41+ Verbosity = context . BuildVerbosity
42+ } ) ;
43+
44+ context . DotNetPack ( weaverPath . FullPath , new DotNetPackSettings
45+ {
46+ OutputDirectory = weaverPath . GetDirectory ( ) . Combine ( "packages" ) ,
47+ MSBuildSettings = context . MsBuildSettingsPack ,
48+ Configuration = context . BuildConfiguration
49+ } ) ;
50+ }
51+
2352 public void Restore ( )
2453 {
2554 context . DotNetRestore ( context . SolutionFile . FullPath ,
@@ -71,7 +100,7 @@ public void Pack()
71100 var settingsSrc = new DotNetPackSettings
72101 {
73102 OutputDirectory = context . ArtifactsDirectory ,
74- ArgumentCustomization = args => args . Append ( "--include-symbols" ) . Append ( "-p:SymbolPackageFormat=snupkg" ) ,
103+ ArgumentCustomization = args => args . Append ( "--include-symbols" ) . Append ( "-p:SymbolPackageFormat=snupkg" ) . Append ( "-p:IsFullPack=true" ) ,
75104 MSBuildSettings = context . MsBuildSettingsPack ,
76105 Configuration = context . BuildConfiguration
77106 } ;
0 commit comments