Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Created September 6, 2016 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/bae66dc0bfd367991ae74a65e8f1fc01 to your computer and use it in GitHub Desktop.
Save dcomartin/bae66dc0bfd367991ae74a65e8f1fc01 to your computer and use it in GitHub Desktop.
#tool "nuget:?package=xunit.runner.console"
var target = Argument("target", "Build");
Task("Default")
.IsDependentOn("xUnit")
.IsDependentOn("Pack");
Task("Build")
.Does(() =>
{
MSBuild("./src/CakeDemo.sln");
});
Task("xUnit")
.IsDependentOn("Build")
.Does(() =>
{
XUnit2("./src/CakeDemo.Tests/bin/Debug/CakeDemo.Tests.dll");
});
Task("Pack")
.IsDependentOn("Build")
.Does(() => {
var nuGetPackSettings = new NuGetPackSettings {
Id = "CakeDemo",
Version = "0.0.0.1",
Title = "Cake Demo",
Authors = new[] {"Derek Comartin"},
Description = "Demo of creating cake.build scripts.",
Summary = "Excellent summary of what the Cake (C# Make) build tool does.",
ProjectUrl = new Uri("https://github.com/dcomartin/Cake.Demo"),
Files = new [] {
new NuSpecContent {Source = "CakeDemo.exe", Target = "bin"},
},
BasePath = "./src/CakeDemo/bin/Debug",
OutputDirectory = "./nuget"
};
NuGetPack(nuGetPackSettings);
});
RunTarget(target);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment