Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///////////////////////////////////////////////////////////////////////////////
- // ARGUMENTS
- ///////////////////////////////////////////////////////////////////////////////
- var target = Argument("target", "Default");
- var configuration = Argument("configuration", "Debug");
- ///////////////////////////////////////////////////////////////////////////////
- // SETUP / TEARDOWN
- ///////////////////////////////////////////////////////////////////////////////
- Setup(ctx =>
- {
- // Executed BEFORE the first task.
- Information("Running tasks...");
- });
- Teardown(ctx =>
- {
- // Executed AFTER the last task.
- Information("Finished running tasks.");
- });
- ///////////////////////////////////////////////////////////////////////////////
- // TASKS
- ///////////////////////////////////////////////////////////////////////////////
- Task("Default")
- .Does(() => {
- Information("Hello Cake!");
- });
- Task("Clean")
- .Does(()=>{
- CleanDirectories("**/bin/"+configuration);
- CleanDirectories("**/obj/"+configuration);
- });
- Task("Build")
- .IsDependentOn("Clean")
- .Does(()=>{
- var path = "D:\MySlnFolder\MyMainProject\MyProject.csproj";
- MSBuild(path,new MSBuildSettings(){
- Configuration = configuration
- });
- });
- RunTarget(target);
Add Comment
Please, Sign In to add comment