<commit_before>$nugetversion = $env:DOTNETR2RMLSTORE_NUGETVERSION
Add-Type -Assembly System.IO.Compression.FileSystem

function Update-NuspecVersion
{
  Param ([string]$Version)
  
  foreach ($o in $input) 
  {
    Write-output ('Updating nuspec file ' + $o.FullName)
    $TmpFile = $o.FullName + ".tmp"

     get-content $o.FullName | 
        %{$_ -replace '\$version\$', $Version } > $TmpFile

     move-item $TmpFile $o.FullName -force
  }
}

function Pack-Nuget
{
  foreach ($o in $input) 
  {
    Write-output ('Packing ' + $o.FullName)
    
	nuget pack $o.FullName -Symbols
  }
}

function ZipFolder
{
	Param ([string]$zipFolderName, [string]$sourceDir)
	
	$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal;
	[System.IO.Compression.ZipFile]::CreateFromDirectory($sourceDir, $zipFolderName, $false);
}

if($nugetversion)
{
	Add-AppveyorMessage -Message ('Nuget version ' + $nugetversion)

	$env:APPVEYOR_BUILD_FOLDER | get-childitem -recurse |? { $_.Name -like '*.nuspec' } | Update-NuspecVersion $nugetversion;
	$env:APPVEYOR_BUILD_FOLDER | get-childitem -recurse |? { $_.Name -like '*.nuspec' } | Pack-Nuget
	
	Get-ChildItem .\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
}

Add-AppveyorMessage -Message 'Publishing bin folder of the build'	
$zipFolderName = ($env:APPVEYOR_BUILD_FOLDER + '\src\Slp.r2rml4net.Storage\Slp.r2rml4net.Storage\bin\' + $env:CONFIGURATION + '.Slp.r2rml4net.Storage.zip');
ZipFolder $zipFolderName ($env:APPVEYOR_BUILD_FOLDER + '\src\Slp.r2rml4net.Storage\Slp.r2rml4net.Storage\bin\' + $env:CONFIGURATION)
Push-AppveyorArtifact $zipFolderName

<commit_msg>Typo - missing compression parameter<commit_after>$nugetversion = $env:DOTNETR2RMLSTORE_NUGETVERSION
Add-Type -Assembly System.IO.Compression.FileSystem

function Update-NuspecVersion
{
  Param ([string]$Version)
  
  foreach ($o in $input) 
  {
    Write-output ('Updating nuspec file ' + $o.FullName)
    $TmpFile = $o.FullName + ".tmp"

     get-content $o.FullName | 
        %{$_ -replace '\$version\$', $Version } > $TmpFile

     move-item $TmpFile $o.FullName -force
  }
}

function Pack-Nuget
{
  foreach ($o in $input) 
  {
    Write-output ('Packing ' + $o.FullName)
    
	nuget pack $o.FullName -Symbols
  }
}

function ZipFolder
{
	Param ([string]$zipFolderName, [string]$sourceDir)
	
	$compressionLevel = [System.IO.Compression.CompressionLevel]::Optimal;
	[System.IO.Compression.ZipFile]::CreateFromDirectory($sourceDir, $zipFolderName, $compressionLevel, $false);
}

if($nugetversion)
{
	Add-AppveyorMessage -Message ('Nuget version ' + $nugetversion)

	$env:APPVEYOR_BUILD_FOLDER | get-childitem -recurse |? { $_.Name -like '*.nuspec' } | Update-NuspecVersion $nugetversion;
	$env:APPVEYOR_BUILD_FOLDER | get-childitem -recurse |? { $_.Name -like '*.nuspec' } | Pack-Nuget
	
	Get-ChildItem .\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
}

Add-AppveyorMessage -Message 'Publishing bin folder of the build'	
$zipFolderName = ($env:APPVEYOR_BUILD_FOLDER + '\src\Slp.r2rml4net.Storage\Slp.r2rml4net.Storage\bin\' + $env:CONFIGURATION + '.Slp.r2rml4net.Storage.zip');
ZipFolder $zipFolderName ($env:APPVEYOR_BUILD_FOLDER + '\src\Slp.r2rml4net.Storage\Slp.r2rml4net.Storage\bin\' + $env:CONFIGURATION)
Push-AppveyorArtifact $zipFolderName


{'fraction_non_alphanumeric': 0.14782345828295043, 'fraction_numerical': 0.006650544135429262, 'mean_word_length': 4.451400329489291, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2458954', 'n_tokens_mistral': 1297, 'n_tokens_neox': 1261, 'n_words': 206}