<commit_before>#addin "Cake.Powershell"

var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");

var versionSuffix = "nuget-test";

var isRunningOnAppVeyor = AppVeyor.IsRunningOnAppVeyor;

Task("Clean")
    .Does(() =>
{
    CleanDirectories("./src/**/bin");
    CleanDirectories("./src/**/obj");
});

Task("Restore")
    .IsDependentOn("Clean")
    .Does(() =>
{
    DotNetCoreRestore("./src/DotNetAirbrake");    
});

Task("Build")
    .IsDependentOn("Restore")
    .Does(() =>
{
    DotNetCoreBuild("./src/DotNetAirbrake", new DotNetCoreBuildSettings
    {
        Configuration = configuration,
        VersionSuffix = versionSuffix
    });
});

Task("Test")
    .IsDependentOn("Build")
    .Does(() =>
{
    // TODO
});

Task("Version")
    .Does(() =>
{
    if (!isRunningOnAppVeyor)
    {
        throw new InvalidOperationException("Can only set version when running on AppVeyor");
    }

    var version = AppVeyor.Environment.Build.Version;

    StartPowershellFile("./update-version.ps1", args =>
    {
        args.Append("projectFile", "./src/DotNetAirbrake/project.json")
            .Append("version", version);
    });
});

Task("Pack")
    .IsDependentOn("Version")
    .IsDependentOn("Build")
    .Does(() =>
{
    var settings = new DotNetCorePackSettings
    {
        Configuration = "Release",
        OutputDirectory = "./output/",
        VersionSuffix = versionSuffix
    };

    DotNetCorePack("./src/DotNetAirbrake", settings);
});

Task("Default")
    .IsDependentOn("Test");

RunTarget(target);<commit_msg>Add aspnetcore project to the CI build<commit_after>#addin "Cake.Powershell"

var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");

var versionSuffix = "nuget-test";

var isRunningOnAppVeyor = AppVeyor.IsRunningOnAppVeyor;

Task("Clean")
    .Does(() =>
{
    CleanDirectories("./src/**/bin");
    CleanDirectories("./src/**/obj");
});

Task("Restore")
    .IsDependentOn("Clean")
    .Does(() =>
{
    DotNetCoreRestore("./src/DotNetAirbrake");    
    DotNotCoreRestore("./src/DotNetAirbrake.AspNetCore");
});

Task("Build")
    .IsDependentOn("Restore")
    .Does(() =>
{
    var settings = new DotNetCoreBuildSettings
    {
        Configuration = configuration,
        VersionSuffix = versionSuffix
    };

    DotNetCoreBuild("./src/DotNetAirbrake", settings);
    DotNetCoreBuild("./src/DotNetAirbrake.AspNetCore", settings);
});

Task("Test")
    .IsDependentOn("Build")
    .Does(() =>
{
    // TODO
});

Task("Version")
    .Does(() =>
{
    if (!isRunningOnAppVeyor)
    {
        throw new InvalidOperationException("Can only set version when running on AppVeyor");
    }

    var version = AppVeyor.Environment.Build.Version;

    StartPowershellFile("./update-version.ps1", args =>
    {
        args.Append("projectFile", "./src/DotNetAirbrake/project.json").Append("version", version);
    });
    StartPowershellFile("./update-version.ps1", args =>
    {
        args.Append("projectFile", "./src/DotNetAirbrake.AspNetCore/project.json").Append("version", version);
    });
});

Task("Pack")
    .IsDependentOn("Version")
    .IsDependentOn("Build")
    .Does(() =>
{
    var settings = new DotNetCorePackSettings
    {
        Configuration = "Release",
        OutputDirectory = "./output/"
    };

    DotNetCorePack("./src/DotNetAirbrake", settings);
    DotNetCorePack("./src/DotNetAirbrake.AspNetCore", settings);
});

Task("Default")
    .IsDependentOn("Test");

RunTarget(target);
{'fraction_non_alphanumeric': 0.17359344076901329, 'fraction_numerical': 0.0008481764206955047, 'mean_word_length': 3.3625154130702835, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 18, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '440597', 'n_tokens_mistral': 1158, 'n_tokens_neox': 1139, 'n_words': 175}