<commit_before>DirectoryPath currentWorkingDirectory;

Task("CompileDebug")
    .Description("Compiles the solution in Debug mode.")
    .Does(() =>
    {
        Compile("Debug");
        dropPrepare("Debug");
    });

private void Compile(string mode)
{
    DotNetBuild(Constants.SolutionFile, settings =>
        settings.SetConfiguration(mode)
            .SetVerbosity(Verbosity.Minimal)
            .WithProperty("nodeReuse", "false")
            .WithTarget("Rebuild"));
}

private void dropPrepare(string releaseTarget)
{
    currentWorkingDirectory = MakeAbsolute(Directory("./"));

    foreach (var project in dropOptions.Projects)
    {
		Information("Gathering release files for project {0}", project.Name);
        var destinationRoot = currentWorkingDirectory
            .Combine("Build")
            .Combine(project.Name)
            .Combine(releaseTarget);

        EnsureDirectoryExists(destinationRoot);
        CleanDirectory(destinationRoot);

        var projectDirectory = currentWorkingDirectory.Combine("src").Combine(project.Name);;

        var sourceDirectory = getSourceDirectory(currentWorkingDirectory, project.Name, releaseTarget);
        var finalDestination = getFinalDestination(currentWorkingDirectory, destinationRoot, project.Name, releaseTarget);

		Information("Copying {0} to {1}.", sourceDirectory, finalDestination);
        CopyDirectory(sourceDirectory, finalDestination);

        var projectEnvironmentDirectory = projectDirectory.Combine("Env");
        if (DirectoryExists(projectEnvironmentDirectory))
        {
            var projectBuildDirectory = currentWorkingDirectory.Combine("Build").Combine(project.Name).Combine("Env");
            CopyDirectory(projectEnvironmentDirectory, projectBuildDirectory);
        }

        foreach (var folderName in project.Folders)
        {
            var source = projectDirectory.Combine(folderName);
            var destination = destinationRoot.Combine(folderName);
            CopyDirectory(source, destination);
        }

        foreach (var fileName in project.Files)
        {
            var source = projectDirectory.GetFilePath(fileName);
            CopyFileToDirectory(source, destinationRoot);
        }
    }
}

private DirectoryPath getSourceDirectory(DirectoryPath currentWorkingDirectory, string projectName, string releaseTarget)
{
    var projectDirectory = currentWorkingDirectory.Combine("src").Combine(projectName);

    if (isWebProject(projectDirectory, releaseTarget))
    {
        return projectDirectory.Combine("bin");
    }

    return projectDirectory.Combine("bin").Combine(releaseTarget);
}

private DirectoryPath getFinalDestination(DirectoryPath currentWorkingDirectory, DirectoryPath destinationRoot, string projectName, string releaseTarget)
{
    var projectDirectory = currentWorkingDirectory.Combine("src").Combine(projectName);

    if (isWebProject(projectDirectory, releaseTarget))
    {
        return destinationRoot.Combine("bin");
    }

    return destinationRoot;
}<commit_msg>Added a function to the compile.csx file.<commit_after>DirectoryPath currentWorkingDirectory;

Task("CompileDebug")
    .Description("Compiles the solution in Debug mode.")
    .Does(() =>
    {
        Compile("Debug");
        dropPrepare("Debug");
    });

private void Compile(string mode)
{
    DotNetBuild(Constants.SolutionFile, settings =>
        settings.SetConfiguration(mode)
            .SetVerbosity(Verbosity.Minimal)
            .WithProperty("nodeReuse", "false")
            .WithTarget("Rebuild"));
}

private void dropPrepare(string releaseTarget)
{
    currentWorkingDirectory = MakeAbsolute(Directory("./"));

    foreach (var project in dropOptions.Projects)
    {
		Information("Gathering release files for project {0}", project.Name);
        var destinationRoot = currentWorkingDirectory
            .Combine("Build")
            .Combine(project.Name)
            .Combine(releaseTarget);

        EnsureDirectoryExists(destinationRoot);
        CleanDirectory(destinationRoot);

        var projectDirectory = currentWorkingDirectory.Combine("src").Combine(project.Name);;

        var sourceDirectory = getSourceDirectory(currentWorkingDirectory, project.Name, releaseTarget);
        var finalDestination = getFinalDestination(currentWorkingDirectory, destinationRoot, project.Name, releaseTarget);

		Information("Copying {0} to {1}.", sourceDirectory, finalDestination);
        CopyDirectory(sourceDirectory, finalDestination);

        var projectEnvironmentDirectory = projectDirectory.Combine("Env");
        if (DirectoryExists(projectEnvironmentDirectory))
        {
            var projectBuildDirectory = currentWorkingDirectory.Combine("Build").Combine(project.Name).Combine("Env");
            CopyDirectory(projectEnvironmentDirectory, projectBuildDirectory);
        }

        foreach (var folderName in project.Folders)
        {
            var source = projectDirectory.Combine(folderName);
            var destination = destinationRoot.Combine(folderName);
            CopyDirectory(source, destination);
        }

        foreach (var fileName in project.Files)
        {
            var source = projectDirectory.GetFilePath(fileName);
            CopyFileToDirectory(source, destinationRoot);
        }
    }
}

private DirectoryPath getSourceDirectory(DirectoryPath currentWorkingDirectory, string projectName, string releaseTarget)
{
    var projectDirectory = currentWorkingDirectory.Combine("src").Combine(projectName);

    if (isWebProject(projectDirectory, releaseTarget))
    {
        return projectDirectory.Combine("bin");
    }

    return projectDirectory.Combine("bin").Combine(releaseTarget);
}

private DirectoryPath getFinalDestination(DirectoryPath currentWorkingDirectory, DirectoryPath destinationRoot, string projectName, string releaseTarget)
{
    var projectDirectory = currentWorkingDirectory.Combine("src").Combine(projectName);

    if (isWebProject(projectDirectory, releaseTarget))
    {
        return destinationRoot.Combine("bin");
    }

    return destinationRoot;
}

private bool isWebProject(DirectoryPath projectDirectory, string releaseTarget)
{
    var projectDirectoryWithReleaseTarget = projectDirectory.Combine("bin").Combine(releaseTarget);
    return !DirectoryExists(projectDirectoryWithReleaseTarget);
}
{'fraction_non_alphanumeric': 0.0953058321479374, 'fraction_numerical': 0.000948316737790422, 'mean_word_length': 3.7650602409638556, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '5182556', 'n_tokens_mistral': 1549, 'n_tokens_neox': 1499, 'n_words': 301}