<commit_before>#tool "xunit.runner.console"
#tool "OpenCover"
#tool "docfx.console"
#tool nuget:?package=coveralls.net&version=0.7.0
#addin "Cake.DocFx"
#addin "Cake.Coveralls"

var target = Argument("target", "Build");
var configuration = Argument("configuration", "release");

// Used to publish NuGet packages
var nugetApiKey = Argument("nugetApiKey", EnvironmentVariable("NuGetApiKey"));

// Used to publish coverage report
var coverallsRepoToken = Argument("coverallsRepoToken", EnvironmentVariable("CoverallsRepoToken"));

// where is our solution located?
var solutionFilePath = GetFiles("src/*.sln").First();
var solutionName = solutionFilePath.GetDirectory().GetDirectoryName();

// Check if we are in a pull request, publishing of packages and coverage should be skipped
var isPullRequest = !string.IsNullOrEmpty(EnvironmentVariable("APPVEYOR_PULL_REQUEST_NUMBER"));

// Check if the commit is marked as release
var isRelease = Argument<bool>("isRelease", string.Compare("[release]", EnvironmentVariable("appveyor_repo_commit_message_extended"), true) == 0);

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

// Publish taks depends on publish specifics
Task("Publish")
	.IsDependentOn("PublishPackages")
	.IsDependentOn("PublishCoverage")
	.IsDependentOn("Documentation")
	.WithCriteria(() => !BuildSystem.IsLocalBuild);

// Publish the coveralls report to Coveralls.NET
Task("PublishCoverage")
	.IsDependentOn("Coverage")
	.WithCriteria(() => !BuildSystem.IsLocalBuild)
	.WithCriteria(() => !string.IsNullOrEmpty(coverallsRepoToken))
	.WithCriteria(() => !isPullRequest)
	.Does(()=>
{
	CoverallsNet("./artifacts/coverage.xml", CoverallsNetReportType.OpenCover, new CoverallsNetSettings
	{
		RepoToken = coverallsRepoToken
	});
});

// Publish the Artifacts of the Package Task to NuGet
Task("PublishPackages")
	.IsDependentOn("Coverage")
	.WithCriteria(() => !BuildSystem.IsLocalBuild)
	.WithCriteria(() => !string.IsNullOrEmpty(nugetApiKey))
	.WithCriteria(() => !isPullRequest)
	.WithCriteria(() => isRelease)
	.Does(()=>
{<commit_msg>Fixing coveralls.io upload [release]<commit_after>#tool "xunit.runner.console"
#tool "OpenCover"
#tool "docfx.console"
#tool "coveralls.io"
#addin "Cake.DocFx"
#addin "Cake.Coveralls"

var target = Argument("target", "Build");
var configuration = Argument("configuration", "release");

// Used to publish NuGet packages
var nugetApiKey = Argument("nugetApiKey", EnvironmentVariable("NuGetApiKey"));

// Used to publish coverage report
var coverallsRepoToken = Argument("coverallsRepoToken", EnvironmentVariable("CoverallsRepoToken"));

// where is our solution located?
var solutionFilePath = GetFiles("src/*.sln").First();
var solutionName = solutionFilePath.GetDirectory().GetDirectoryName();

// Check if we are in a pull request, publishing of packages and coverage should be skipped
var isPullRequest = !string.IsNullOrEmpty(EnvironmentVariable("APPVEYOR_PULL_REQUEST_NUMBER"));

// Check if the commit is marked as release
var isRelease = Argument<bool>("isRelease", string.Compare("[release]", EnvironmentVariable("appveyor_repo_commit_message_extended"), true) == 0);

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

// Publish taks depends on publish specifics
Task("Publish")
	.IsDependentOn("PublishPackages")
	.IsDependentOn("PublishCoverage")
	.IsDependentOn("Documentation")
	.WithCriteria(() => !BuildSystem.IsLocalBuild);

// Publish the coveralls report to Coveralls.io
Task("PublishCoverage")
	.IsDependentOn("Coverage")
	.WithCriteria(() => !BuildSystem.IsLocalBuild)
	.WithCriteria(() => !string.IsNullOrEmpty(coverallsRepoToken))
	.WithCriteria(() => !isPullRequest)
	.Does(()=>
{
	CoverallsIo("./artifacts/coverage.xml", new CoverallsIoSettings
	{
		RepoToken = coverallsRepoToken
	});
});

// Publish the Artifacts of the Package Task to NuGet
Task("PublishPackages")
	.IsDependentOn("Coverage")
	.WithCriteria(() => !BuildSystem.IsLocalBuild)
	.WithCriteria(() => !string.IsNullOrEmpty(nugetApiKey))
	.WithCriteria(() => !isPullRequest)
	.WithCriteria(() => isRelease)
	.Does(()=>
{
{'fraction_non_alphanumeric': 0.14575098814229248, 'fraction_numerical': 0.0012351778656126482, 'mean_word_length': 6.862135922330097, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '589194', 'n_tokens_mistral': 1249, 'n_tokens_neox': 1243, 'n_words': 278}