8
8
using Cake . Common . Tools . DotNet . Workload . Install ;
9
9
using Cake . Core ;
10
10
using Cake . Core . IO ;
11
+ using System . Linq ;
11
12
12
13
namespace BenchmarkDotNet . Build . Runners ;
13
14
@@ -20,6 +21,34 @@ public BuildRunner(BuildContext context)
20
21
this . context = context ;
21
22
}
22
23
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
+
23
52
public void Restore ( )
24
53
{
25
54
context . DotNetRestore ( context . SolutionFile . FullPath ,
@@ -71,7 +100,7 @@ public void Pack()
71
100
var settingsSrc = new DotNetPackSettings
72
101
{
73
102
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" ) ,
75
104
MSBuildSettings = context . MsBuildSettingsPack ,
76
105
Configuration = context . BuildConfiguration
77
106
} ;
0 commit comments