Skip to content

Commit

Permalink
Merge pull request #143 from nils-a/bugfix/GH-142
Browse files Browse the repository at this point in the history
(GH-142) modified gitignore, so that the cakefrosting
  • Loading branch information
nils-a authored May 17, 2021
2 parents 5f9a221 + 0c51cc6 commit ff5a6c8
Show file tree
Hide file tree
Showing 15 changed files with 68 additions and 142 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,4 @@ Desktop.ini
bin/
obj/
/src/projectTemplates/**/.idea
!/src/projectTemplates/**/build

This file was deleted.

Binary file not shown.
35 changes: 0 additions & 35 deletions src/projectTemplates/cakeaddin/.template.config/ide.host.json

This file was deleted.

This file was deleted.

Binary file not shown.
21 changes: 0 additions & 21 deletions src/projectTemplates/cakeaddintest/.template.config/ide.host.json

This file was deleted.

This file was deleted.

Binary file not shown.
14 changes: 0 additions & 14 deletions src/projectTemplates/cakefrosting/.template.config/ide.host.json

This file was deleted.

10 changes: 10 additions & 0 deletions src/projectTemplates/cakefrosting/build/Build.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Cake.Frosting" Version="1.0.0" />
</ItemGroup>
</Project>
57 changes: 57 additions & 0 deletions src/projectTemplates/cakefrosting/build/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
using System.Threading.Tasks;
using Cake.Core;
using Cake.Core.Diagnostics;
using Cake.Frosting;

public static class Program
{
public static int Main(string[] args)
{
return new CakeHost()
.UseContext<BuildContext>()
.Run(args);
}
}

public class BuildContext : FrostingContext
{
public bool Delay { get; set; }

public BuildContext(ICakeContext context)
: base(context)
{
Delay = context.Arguments.HasArgument("delay");
}
}

[TaskName("Hello")]
public sealed class HelloTask : FrostingTask<BuildContext>
{
public override void Run(BuildContext context)
{
context.Log.Information("Hello");
}
}

[TaskName("World")]
[IsDependentOn(typeof(HelloTask))]
public sealed class WorldTask : AsyncFrostingTask<BuildContext>
{
// Tasks can be asynchronous
public override async Task RunAsync(BuildContext context)
{
if (context.Delay)
{
context.Log.Information("Waiting...");
await Task.Delay(1500);
}

context.Log.Information("World");
}
}

[TaskName("Default")]
[IsDependentOn(typeof(WorldTask))]
public class DefaultTask : FrostingTask
{
}

This file was deleted.

Binary file not shown.
14 changes: 0 additions & 14 deletions src/projectTemplates/cakemodule/.template.config/ide.host.json

This file was deleted.

0 comments on commit ff5a6c8

Please sign in to comment.