<commit_before>Func<string, bool> hasEnvVar = varName => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(varName));
Func<string, string> getEnvVar = varName => Environment.GetEnvironmentVariable(varName); // Get arguments passed to the script.

const string defaultVersion = "0.1.1";

var target = Argument("target", "All");
var configuration = Argument("configuration", getEnvVar("Configuration") ?? "Debug");
var version = Argument("version", defaultVersion);
var label = Argument("label", (string)null);
var packageVersion = version + (label != null ? "-" + label : "");

if (getEnvVar("BuildRunner") == "MyGet" && version == defaultVersion)
{
	packageVersion = getEnvVar("PackageVersion");
	version = packageVersion.Split('-')[0];
}

// Define directories.
var projectName = "Cake.AliaSql";
var sourceDir = "./src";
var buildDir = sourceDir + "/" + projectName + "/bin/" + configuration;
var buildResultDir = "./build/v" + packageVersion;
var testResultsDir = buildResultDir + "/tests";
var nugetDir = buildResultDir + "/nuget";
var binDir = buildResultDir + "/bin";

var solutionFile = sourceDir + "/" + projectName + ".sln";

//////////////////////////////////////////////////////////////////////////

Task("Clean")
	.Description("Cleans the build and output directories.")
	.Does(() =>
{
	CleanDirectories(new DirectoryPath[] {
		buildResultDir, binDir, testResultsDir, nugetDir});
});

Task("Restore-NuGet-Packages")
	.Description("Restores all NuGet packages in solution.")
	.IsDependentOn("Clean")
	.Does(() =><commit_msg>Bumped to 0.1.2. Tweaked MyGet<commit_after>Func<string, bool> hasEnvVar = varName => !string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable(varName));
Func<string, string> getEnvVar = varName => Environment.GetEnvironmentVariable(varName); // Get arguments passed to the script.

const string defaultVersion = "0.1.2";

var target = Argument("target", "All");
var configuration = Argument("configuration", getEnvVar("Configuration") ?? "Debug");
var version = Argument("version", defaultVersion);
var label = Argument("label", (string)null);
var packageVersion = version + (label != null ? "-" + label : "");

if (getEnvVar("BuildRunner") == "MyGet" && version == defaultVersion)
{
	packageVersionFormat = getEnvVar("VersionFormat");
	packageVersion = string.Format(packageVersionFormat, getEnvVar("BuildCounter"), version);
}

// Define directories.
var projectName = "Cake.AliaSql";
var sourceDir = "./src";
var buildDir = sourceDir + "/" + projectName + "/bin/" + configuration;
var buildResultDir = "./build/v" + packageVersion;
var testResultsDir = buildResultDir + "/tests";
var nugetDir = buildResultDir + "/nuget";
var binDir = buildResultDir + "/bin";

var solutionFile = sourceDir + "/" + projectName + ".sln";

//////////////////////////////////////////////////////////////////////////

Task("Clean")
	.Description("Cleans the build and output directories.")
	.Does(() =>
{
	CleanDirectories(new DirectoryPath[] {
		buildResultDir, binDir, testResultsDir, nugetDir});
});

Task("Restore-NuGet-Packages")
	.Description("Restores all NuGet packages in solution.")
	.IsDependentOn("Clean")
	.Does(() =>
{'fraction_non_alphanumeric': 0.1997471554993679, 'fraction_numerical': 0.0031605562579013905, 'mean_word_length': 4.337268128161889, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '5844277', 'n_tokens_mistral': 894, 'n_tokens_neox': 886, 'n_words': 226}