# Generate Nuget package from this folder (find *.nuspec files at this level)


# Set up initial variables, paths, constants
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Unrestricted
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted
$nuget = "$env:LOCALAPPDATA\Nuget\Nuget.exe"
$current = (Get-Location).Path
Set-Alias nuget $nuget

$nuspecFiles = Get-ChildItem -Path $current | Where-Object {
    $_.FullName -like "*.nuspec"} | Select-Object
	
foreach($file in $nuspecFiles){
    nuget pack $file.FullName
	Write-Host ("Generated nuget package from {0}" -f $file.FullName) -ForegroundColor White
}	
