<commit_before>#tool nuget:?package=NUnit.ConsoleRunner
#tool nuget:?package=vswhere

// ARGUMENTS
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
var version = Argument("BuildVersion", "0.0.1");

// PREPARATION
// Define directories.
var outputDir = Directory("./BuildArtifacts");

//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////

Task("Clean")
    .Does(() =>
{
    CleanDirectory(outputDir);
});

Task("Restore")
    .IsDependentOn("Clean")
    .Does(() =>
{
    NuGetRestore("./dotless.sln");
});

Task("Build")	
    .IsDependentOn("Restore")
    .Does(() =>
{    
	// get MSBuild 15 location
	var vsLatest  = VSWhereLatest(new VSWhereLatestSettings { Requires = "Microsoft.Component.MSBuild" });
	FilePath msBuildPath = (vsLatest==null)<commit_msg>Set version number in assemblies<commit_after>#tool nuget:?package=NUnit.ConsoleRunner
#tool nuget:?package=vswhere

#addin "nuget:?package=Cake.FileHelpers"

// ARGUMENTS
var target = Argument("target", "Default");
var configuration = Argument("configuration", "Release");
var version = Argument("BuildVersion", "0.0.1");

// PREPARATION
// Define directories.
var outputDir = Directory("./BuildArtifacts");

//////////////////////////////////////////////////////////////////////
// TASKS
//////////////////////////////////////////////////////////////////////

Task("Clean")
    .Does(() =>
{
    CleanDirectory(outputDir);
});

Task("Restore")
    .IsDependentOn("Clean")
    .Does(() =>
{
    NuGetRestore("./dotless.sln");
});

Task("SetVersion")
    .IsDependentOn("Clean")
    .Does(() =>
{
	ReplaceRegexInFiles("./src/dotless.AspNet/Properties/AssemblyInfo.cs", "(?<=AssemblyVersion\\(\")(.+?)(?=\"\\))", version);
	ReplaceRegexInFiles("./src/dotless.AspNet/Properties/AssemblyInfo.cs", "(?<=AssemblyFileVersion\\(\")(.+?)(?=\"\\))", version);
	
	ReplaceRegexInFiles("./src/dotless.Compiler/dotless.Compiler.csproj", "<Version>([0-9\\.]*)</Version>", $"<Version>{version}</Version>");
	ReplaceRegexInFiles("./src/dotless.Core/dotless.Core.csproj", "<Version>([0-9\\.]*)</Version>", $"<Version>{version}</Version>");	
});


Task("Build")	
    .IsDependentOn("Restore")
	.IsDependentOn("SetVersion")
    .Does(() =>
{    
	// get MSBuild 15 location
	var vsLatest  = VSWhereLatest(new VSWhereLatestSettings { Requires = "Microsoft.Component.MSBuild" });
	FilePath msBuildPath = (vsLatest==null)
{'fraction_non_alphanumeric': 0.2961339178955759, 'fraction_numerical': 0.005579912315663611, 'mean_word_length': 2.7972768532526473, 'pattern_counts': {'":': 0, '<': 13, '<?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': '7673298', 'n_tokens_mistral': 772, 'n_tokens_neox': 752, 'n_words': 115}