<commit_before>param (
	[parameter(Mandatory=$false, HelpMessage="Specify path to target solution file.")]
	[string] $SolutionFilePath,
	[parameter(Mandatory=$true, HelpMessage="Specify path to target project file.")]
	[ValidateNotNullOrEmpty()]
	[string] $ProjectFilePath,
	[parameter(Mandatory=$true, HelpMessage="Specify destination path for nuspec file.")]
	[ValidateNotNullOrEmpty()]
	[string] $NuspecDestinationPath,
	[parameter(Mandatory=$true, HelpMessage="Specify source path for nuspec file.")]
	[ValidateNotNullOrEmpty()]
	[string] $NuspecSourcePath,
	[parameter(Mandatory=$true)]
	[ValidateNotNullOrEmpty()]
	[string] $VersionFilePath = "..\version.txt",
    [switch] $RebuildSolution,
    [parameter(Mandatory=$false)]
    [string] $NuGetPackageOutputDirectory = "Package",
    [parameter(Mandatory=$false)]
    [string[]] $NuSpecReplacements = @()
)
$env:PsModulePath += ";$PsScriptRoot\Modules"

Import-Module Invoke-MsBuild -Verbose
Import-Module Transform-Nuspec -Verbose

try
{
    $Version = Get-Content -Path $VersionFilePath
    if(!($Version -match "^(\d+\.)?(\d+\.)?(\*|\d+)$"))
    {
        throw [System.Exception] "Invalid version number. Check your version.txt file." 
    }

    $BuildConfigurations = @("Release 4.6.1", "Release 4.6", "Release 4.5.2", "Release 4.5.1", "Release 4.5") 
    if($RebuildSolution)
    {   
        foreach ($conf in $BuildConfigurations)
        {
            Write-Host "Rebuilding project in $conf configuration."
            Build-Solution -SolutionFilePath $SolutionFilePath -BuildConfiguration $conf
        }
    }

    Transform-Nuspec -Params $(,$Version + $NuSpecReplacements) -SourcePath $NuspecSourcePath -DestinationPath $NuspecDestinationPath
   
    if(!(Test-Path $NuGetPackageOutputDirectory))
    {
        New-Item -Path $NuGetPackageOutputDirectory -Type directory
    }
    
    & nuget pack $ProjectFilePath -Symbols -Verbose -outputdirectory $NuGetPackageOutputDirectory -Prop Configuration=`"$($BuildConfigurations[0])`"
}
catch [Exception]
{
    Write-Host $_.Exception.Message
    throw $_
}

<commit_msg>verbose flag was removed for nuget 4-rc3<commit_after>param (
	[parameter(Mandatory=$false, HelpMessage="Specify path to target solution file.")]
	[string] $SolutionFilePath,
	[parameter(Mandatory=$true, HelpMessage="Specify path to target project file.")]
	[ValidateNotNullOrEmpty()]
	[string] $ProjectFilePath,
	[parameter(Mandatory=$true, HelpMessage="Specify destination path for nuspec file.")]
	[ValidateNotNullOrEmpty()]
	[string] $NuspecDestinationPath,
	[parameter(Mandatory=$true, HelpMessage="Specify source path for nuspec file.")]
	[ValidateNotNullOrEmpty()]
	[string] $NuspecSourcePath,
	[parameter(Mandatory=$true)]
	[ValidateNotNullOrEmpty()]
	[string] $VersionFilePath = "..\version.txt",
    [switch] $RebuildSolution,
    [parameter(Mandatory=$false)]
    [string] $NuGetPackageOutputDirectory = "Package",
    [parameter(Mandatory=$false)]
    [string[]] $NuSpecReplacements = @()
)
$env:PsModulePath += ";$PsScriptRoot\Modules"

Import-Module Invoke-MsBuild -Verbose
Import-Module Transform-Nuspec -Verbose

try
{
    $Version = Get-Content -Path $VersionFilePath
    if(!($Version -match "^(\d+\.)?(\d+\.)?(\*|\d+)$"))
    {
        throw [System.Exception] "Invalid version number. Check your version.txt file." 
    }

    $BuildConfigurations = @("Release 4.6.1", "Release 4.6", "Release 4.5.2", "Release 4.5.1", "Release 4.5") 
    if($RebuildSolution)
    {   
        foreach ($conf in $BuildConfigurations)
        {
            Write-Host "Rebuilding project in $conf configuration."
            Build-Solution -SolutionFilePath $SolutionFilePath -BuildConfiguration $conf
        }
    }

    Transform-Nuspec -Params $(,$Version + $NuSpecReplacements) -SourcePath $NuspecSourcePath -DestinationPath $NuspecDestinationPath
   
    if(!(Test-Path $NuGetPackageOutputDirectory))
    {
        New-Item -Path $NuGetPackageOutputDirectory -Type directory
    }
    
    & nuget pack $ProjectFilePath -Symbols -outputdirectory $NuGetPackageOutputDirectory -Prop Configuration=`"$($BuildConfigurations[0])`"
}
catch [Exception]
{
    Write-Host $_.Exception.Message
    throw $_
}


{'fraction_non_alphanumeric': 0.1406101048617731, 'fraction_numerical': 0.007149666348903718, 'mean_word_length': 4.285894206549118, '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': '2198810', 'n_tokens_mistral': 1332, 'n_tokens_neox': 1299, 'n_words': 275}