Cake.AppVeyor
by Jonathan Dick
A set of aliases for Cake to access the AppVeyor REST API's
The AppVeyor alias, which returns an IAppVeyorProvider instance can be used to interact with the AppVeyor environment.
The following example writes an error message if running on AppVeyor:
if (BuildSystem.AppVeyor.IsRunningOnAppVeyor)
{
BuildSystem.AppVeyor.AddMessage(
"This is a error message.",
AppVeyorMessageCategoryType.Error,
"Error details."
);
}
else
{
Information("Not running on AppVeyor");
}
See IAppVeyorProvider for details and available methods to interact with AppVeyor.
The recommended way to run the Cake .NET Tool on AppVeyor is by using a tool manifest:
build_script:
- dotnet tool restore
- dotnet cake
If you are using Cake.Sdk with a file-based script:
build_script:
- dotnet cake.cs
If you are using Cake.Sdk with a project:
build_script:
- dotnet run --project cake.csproj
If you are using Cake Frosting:
build_script:
- dotnet run --project cake.csproj