diff --git a/README.md b/README.md index 78f7996df..ec9282457 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,31 @@ NUKE brings your build automation to an even level with every other .NET project ## Example -

+```C# +class Build : NukeBuild +{ + public static int Main () => Execute(x => x.Compile); + [Solution] readonly Solution Solution; + [GitVersion] readonly GitVersion GitVersion; + + AbsolutePath OutputDirectory => RootDirectory / "output"; + + Target Clean => _ => _ + .Executes(() => + { + OutputDirectory.CreateOrCleanDirectory(); + }); + + Target Compile => _ => _ + .DependsOn(Clean) + .Executes(() => + { + DotNetTasks.DotNetBuild(s => s + .SetProjectFile(Solution) + .SetVersion(GitVersion.NuGetVersionV2)); + }); +} +``` ## Build Status