<commit_before>Framework "4.5.1"

#required parameters:
#$major_ver
#$minor_ver
#$build_counter
#$build_vcs_number

properties {
    $project = "TeamCityApi"
    
    $companyName = "Computer Workware Inc."
    $productName = "VITAL Objects"
    $date = [DateTime]::Now
    $global:config = "release"

    #version
    $buildVer = [string]::Format("{0}{1:00}{2:00}",$date.Year-$initial_year,$date.Month,$date.Day)
    $revisionVer = if ($build_counter) { $build_counter  } else { "0" }
    $voVersion = "$major_ver.$minor_ver.0.0"
    $fileVersion = "$major_ver.$minor_ver.$buildVer.$revisionVer"
    $assemblyVersion = $voVersion


    #general dirs
    $base_dir = resolve-path .
    $build_dir = "$base_dir\build"
    $source_dir = "$base_dir\src"
    $tools_dir = "$base_dir\tools"
    $test_dir = "$build_dir\test"
    $result_dir = "$build_dir\results"
    $pubsites_dir = "$build_dir\_PublishedWebsites"
    $webapp_dir = "$pubsites_dir\$project"
}

task default -depends compile, dist
task local -depends compile, test
task full -depends local, dist
task ci -depends clean, release, commonAssemblyInfo, local

task clean {
	delete_directory "$build_dir"
}

task release {
    $global:config = "release"
}

task compile -depends clean { 
    exec { msbuild /t:Clean /t:Build /p:Configuration=$config /p:OutDir=$build_dir /p:TeamCityApiPath="$build_dir\" $source_dir\$project.sln }
}

task commonAssemblyInfo {
    create-assemblyInfo $fileVersion $assemblyVersion "$source_dir\CommonAssemblyInfo.cs"
}

task test {
    create_directory "$build_dir\results"
    
    $testassemblies = @(get-childitem $build_dir -recurse -include *tests.dll);
    if ($testassemblies.count -gt 0)
    {
        exec { & $tools_dir\xunit\xunit.console.clr4.exe $testassemblies /teamcity }
    }
}

# -------------------------------------------------------------------------------------------------------------<commit_msg>Tweak build script to copy TeamCityApi.dll after compile<commit_after>Framework "4.5.1"

#required parameters:
#$major_ver
#$minor_ver
#$build_counter
#$build_vcs_number

properties {
    $project = "TeamCityApi"
    
    $companyName = "Computer Workware Inc."
    $productName = "VITAL Objects"
    $date = [DateTime]::Now
    $global:config = "release"

    #version
    $buildVer = [string]::Format("{0}{1:00}{2:00}",$date.Year-$initial_year,$date.Month,$date.Day)
    $revisionVer = if ($build_counter) { $build_counter  } else { "0" }
    $voVersion = "$major_ver.$minor_ver.0.0"
    $fileVersion = "$major_ver.$minor_ver.$buildVer.$revisionVer"
    $assemblyVersion = $voVersion


    #general dirs
    $base_dir = resolve-path .
    $build_dir = "$base_dir\build"
    $source_dir = "$base_dir\src"
    $tools_dir = "$base_dir\tools"
    $test_dir = "$build_dir\test"
    $result_dir = "$build_dir\results"
    $pubsites_dir = "$build_dir\_PublishedWebsites"
    $webapp_dir = "$pubsites_dir\$project"
}

task default -depends compile, dist
task local -depends compile, test
task full -depends local, dist
task ci -depends clean, release, commonAssemblyInfo, local

task clean {
	delete_directory "$build_dir"
}

task release {
    $global:config = "release"
}

task compile -depends clean { 
    exec { msbuild /t:Clean /t:Build /p:Configuration=$config /p:OutDir=$build_dir /p:TeamCityApiPath="$build_dir\" $source_dir\$project.sln }
    if ( -not (Test-Path "$source_dir\TeamCityApi\bin\Debug\"))
    {
        New-Item -ItemType directory -Path "$source_dir\TeamCityApi\bin\Debug\"
    }
    cp "$build_dir\TeamCityApi.dll" "$source_dir\TeamCityApi\bin\Debug\TeamCityApi.dll"
}

task commonAssemblyInfo {
    create-assemblyInfo $fileVersion $assemblyVersion "$source_dir\CommonAssemblyInfo.cs"
}

task test {
    create_directory "$build_dir\results"
    
    $testassemblies = @(get-childitem $build_dir -recurse -include *tests.dll);
    if ($testassemblies.count -gt 0)
    {
        exec { & $tools_dir\xunit\xunit.console.clr4.exe $testassemblies /teamcity }
    }
}

# -------------------------------------------------------------------------------------------------------------
{'fraction_non_alphanumeric': 0.18587088915956151, 'fraction_numerical': 0.007308160779537149, 'mean_word_length': 3.0653465346534654, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '6758651', 'n_tokens_mistral': 1401, 'n_tokens_neox': 1355, 'n_words': 261}