@@ -94,6 +94,14 @@ void VerifyHeaders(bool Replace)
94
94
}
95
95
}
96
96
97
+ void RetrieveVersion ( )
98
+ {
99
+ Information ( "\n Retrieving version..." ) ;
100
+ var results = StartPowershellFile ( versionClient ) ;
101
+ Version = results [ 1 ] . Properties [ "NuGetPackageVersion" ] . Value . ToString ( ) ;
102
+ Information ( "\n Build Version: " + Version ) ;
103
+ }
104
+
97
105
//////////////////////////////////////////////////////////////////////
98
106
// DEFAULT TASK
99
107
//////////////////////////////////////////////////////////////////////
@@ -137,14 +145,11 @@ Task("Version")
137
145
138
146
NuGetInstall ( new [ ] { "nerdbank.gitversioning" } , installSettings ) ;
139
147
140
- Information ( "\n Retrieving version..." ) ;
141
- var results = StartPowershellFile ( versionClient ) ;
142
- Version = results [ 1 ] . Properties [ "NuGetPackageVersion" ] . Value . ToString ( ) ;
143
- Information ( "\n Build Version: " + Version ) ;
148
+ RetrieveVersion ( ) ;
144
149
} ) ;
145
150
146
- Task( "Build " )
147
- . Description ( "Build all projects and get the assemblies " )
151
+ Task ( "BuildProjects " )
152
+ . Description ( "Build all projects" )
148
153
. IsDependentOn ( "Version" )
149
154
. Does ( ( ) =>
150
155
{
@@ -173,9 +178,9 @@ Task("Build")
173
178
} ) ;
174
179
175
180
Task ( "InheritDoc" )
176
- . Description ( "Updates <inheritdoc /> tags from base classes, interfaces, and similar methods" )
177
- . IsDependentOn ( "Build " )
178
- . Does ( ( ) =>
181
+ . Description ( "Updates <inheritdoc /> tags from base classes, interfaces, and similar methods" )
182
+ . IsDependentOn ( "BuildProjects " )
183
+ . Does ( ( ) =>
179
184
{
180
185
Information ( "\n Downloading InheritDoc..." ) ;
181
186
var installSettings = new NuGetInstallSettings {
@@ -201,9 +206,13 @@ Task("InheritDoc")
201
206
Information ( "\n Finished generating documentation with InheritDoc" ) ;
202
207
} ) ;
203
208
209
+ Task ( "Build" )
210
+ . Description ( "Build all projects runs InheritDoc" )
211
+ . IsDependentOn ( "BuildProjects" )
212
+ . IsDependentOn ( "InheritDoc" ) ;
213
+
204
214
Task ( "Package" )
205
215
. Description ( "Pack the NuPkg" )
206
- . IsDependentOn ( "InheritDoc" )
207
216
. Does ( ( ) =>
208
217
{
209
218
// Invoke the pack target in the end
@@ -236,12 +245,14 @@ Task("Package")
236
245
buildSettings . SetPlatformTarget ( PlatformTarget . x86 ) ;
237
246
MSBuild ( Solution , buildSettings ) ;
238
247
248
+ RetrieveVersion ( ) ;
249
+
239
250
var nuGetPackSettings = new NuGetPackSettings
240
251
{
241
252
OutputDirectory = nupkgDir ,
242
253
Version = Version
243
254
} ;
244
-
255
+
245
256
var nuspecs = GetFiles ( "./*.nuspec" ) ;
246
257
foreach ( var nuspec in nuspecs )
247
258
{
@@ -264,7 +275,6 @@ public string getMSTestAdapterPath(){
264
275
265
276
Task ( "Test" )
266
277
. Description ( "Runs all Tests" )
267
- . IsDependentOn ( "Build" )
268
278
. Does ( ( ) =>
269
279
{
270
280
var vswhere = VSWhereLatest ( new VSWhereLatestSettings
@@ -300,7 +310,8 @@ Task("Test")
300
310
//////////////////////////////////////////////////////////////////////
301
311
302
312
Task ( "Default" )
303
- . IsDependentOn ( "Test" )
313
+ . IsDependentOn ( "Build" )
314
+ . IsDependentOn ( "Test" )
304
315
. IsDependentOn ( "Package" ) ;
305
316
306
317
Task ( "UpdateHeaders" )
0 commit comments