@@ -10,7 +10,8 @@ var runtime = Argument("r", "");
1010var framework = Argument ( "f" , "" ) ;
1111var output = Argument < string > ( "o" , null ) ;
1212
13- var noRestore = Argument < bool > ( "no-restore" , false ) ;
13+ var noRestore = Argument ( "no-restore" , false ) ;
14+ var noBuild = Argument ( "no-build" , false ) ;
1415
1516string engineProjectFile = "src/Kryptor/Kryptor.csproj" ;
1617string clientProjectFile = "src/Kryptor.Client/Kryptor.Client.csproj" ;
@@ -115,6 +116,7 @@ Task("Restore-Engine")
115116Task ( "Build-Engine" )
116117 . Description ( "Build kryptor engine" )
117118 . IsDependentOn ( "Restore-Engine" )
119+ . WithCriteria ( ! noBuild )
118120 . Does ( ( ) => {
119121 DotNetBuild ( engineProjectFile , GlobalBuildSettings ) ;
120122 } ) ;
@@ -137,6 +139,7 @@ Task("Restore-Client")
137139Task ( "Build-Client" )
138140 . Description ( "Build kryptor client utilities" )
139141 . IsDependentOn ( "Restore-Client" )
142+ . WithCriteria ( ! noBuild )
140143 . Does ( ( ) => {
141144 DotNetBuild ( clientProjectFile , GlobalBuildSettings ) ;
142145 } ) ;
@@ -159,6 +162,7 @@ Task("Restore-Cli")
159162Task ( "Build-Cli" )
160163 . Description ( "Build kryptor command line interface" )
161164 . IsDependentOn ( "Restore-Cli" )
165+ . WithCriteria ( ! noBuild )
162166 . Does ( ( ) => {
163167 DotNetBuild ( cliProjectFile , GlobalBuildSettings ) ;
164168 } ) ;
@@ -240,6 +244,7 @@ Task("Restore-Engine.Test")
240244Task ( "Build-Engine.Test" )
241245 . Description ( "Build kryptor engine test" )
242246 . IsDependentOn ( "Restore-Engine.Test" )
247+ . WithCriteria ( ! noBuild )
243248 . Does ( ( ) => {
244249 DotNetBuild ( engineTestProjectFile , GlobalBuildSettings ) ;
245250 } ) ;
@@ -251,6 +256,12 @@ Task("Test-Engine")
251256 DotNetTest ( engineTestProjectFile , GlobalTestSettings ) ;
252257 } ) ;
253258
259+ Task ( "Restore-All" )
260+ . Description ( "Restore all projects" )
261+ . IsDependentOn ( "Restore-Engine" )
262+ . IsDependentOn ( "Restore-Client" )
263+ . IsDependentOn ( "Restore-Cli" ) ;
264+
254265Task ( "Build-All" )
255266 . Description ( "Build all projects" )
256267 . IsDependentOn ( "Build-Engine" )
0 commit comments