@@ -16,6 +16,7 @@ using System.Text.RegularExpressions;
1616//////////////////////////////////////////////////////////////////////
1717
1818var target = Argument( "target", " Default") ;
19+ var configuration = Argument( "configuration" , "Release" ) ;
1920
2021//////////////////////////////////////////////////////////////////////
2122// VERSIONS
@@ -35,7 +36,7 @@ var toolsDir = buildDir + "/tools";
3536var binDir = baseDir + "/bin" ;
3637var nupkgDir = binDir + "/nupkg" ;
3738
38- var taefBinDir = baseDir + "/UITests/UITests.Tests.TAEF/bin/Release /net5.0-windows10.0.19041/win10-x86" ;
39+ var taefBinDir = baseDir + $ "/UITests/UITests.Tests.TAEF/bin/{ configuration } /net5.0-windows10.0.19041/win10-x86";
3940
4041var styler = toolsDir + "/XamlStyler.Console/tools/xstyler.exe" ;
4142var stylerFile = baseDir + "/settings.xamlstyler" ;
@@ -167,7 +168,7 @@ Task("BuildProjects")
167168 {
168169 MaxCpuCount = 0
169170 }
170- . SetConfiguration ( "Release" )
171+ . SetConfiguration ( configuration )
171172 . WithTarget ( "Restore" ) ;
172173
173174 UpdateToolsPath ( buildSettings ) ;
@@ -181,7 +182,7 @@ Task("BuildProjects")
181182 {
182183 MaxCpuCount = 0
183184 }
184- . SetConfiguration ( "Release" )
185+ . SetConfiguration ( configuration )
185186 . EnableBinaryLogger ( )
186187 . WithTarget ( "Build" ) ;
187188
@@ -235,7 +236,7 @@ Task("Package")
235236 {
236237 MaxCpuCount = 0
237238 }
238- . SetConfiguration ( "Release" )
239+ . SetConfiguration ( configuration )
239240 . WithTarget ( "Pack" )
240241 . WithProperty ( "PackageOutputPath" , nupkgDir ) ;
241242
@@ -274,13 +275,13 @@ Task("Test")
274275 ArgumentCustomization = arg => arg . Append ( "/logger:trx;LogFileName=VsTestResultsUwp.trx /framework:FrameworkUap10" ) ,
275276 } ;
276277
277- VSTest ( baseDir + "/**/Release /**/UnitTests.*.appxrecipe" , testSettings ) ;
278+ VSTest ( baseDir + $ "/**/{ configuration } /**/UnitTests.*.appxrecipe", testSettings ) ;
278279} ) . DoesForEach ( GetFiles ( baseDir + "/**/UnitTests.*NetCore.csproj" ) , ( file ) =>
279280{
280281 Information ( "\n Running NetCore Unit Tests" ) ;
281282 var testSettings = new DotNetCoreTestSettings
282283 {
283- Configuration = "Release" ,
284+ Configuration = configuration ,
284285 NoBuild = true ,
285286 Loggers = new [ ] { "trx;LogFilePrefix=VsTestResults" } ,
286287 Verbosity = DotNetCoreVerbosity . Normal ,
@@ -329,7 +330,7 @@ Task("MSTestUITest")
329330
330331 var testSettings = new DotNetCoreTestSettings
331332 {
332- Configuration = "Release" ,
333+ Configuration = configuration ,
333334 NoBuild = true ,
334335 Loggers = new [ ] { "trx;LogFilePrefix=VsTestResults" } ,
335336 Verbosity = DotNetCoreVerbosity . Normal
0 commit comments