Skip to content

Instantly share code, notes, and snippets.

@johnmmoss
Created February 2, 2019 15:45
Show Gist options
  • Select an option

  • Save johnmmoss/a8f85d094c9a7ca49bf1f524c4067dae to your computer and use it in GitHub Desktop.

Select an option

Save johnmmoss/a8f85d094c9a7ca49bf1f524c4067dae to your computer and use it in GitHub Desktop.
var target = Argument<string>("Target");
var runLocal = true;
Setup(context =>
{
Information("Task Setup Method ran...");
});
Teardown(context =>
{
Information("Task Teardown Method ran...");
});
TaskSetup((context) =>
{
Information("Task Teardown Method ran...");
});
TaskTeardown((context) =>
{
Information("Task Teardown Method ran...");
});
Task("Hello")
.WithCriteria(runLocal)
.ContinueOnError()
.Does(() =>
{
Information("Hello from my first Cake script!");
});
Task("Goodbye")
.WithCriteria(runLocal)
.ContinueOnError()
.IsDependentOn("Hello")
.Does(() =>
{
Information("Goodbye from my first Cake script!");
});
RunTarget(target);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment