|
1 |
| -param([string]$dropLocation, [string]$packageVersion="0.0.1", [switch] $excludeCommandPackages, [switch] $excludeCluRun) |
| 1 | +param([string]$dropLocation, [string]$packageVersion="0.0.1", [string] $commandPackagesToBuild = "*", [string] $exceptCommandPackagesToBuild, [switch] $excludeCluRun) |
2 | 2 |
|
3 | 3 | $thisScriptDirectory = Split-Path $MyInvocation.MyCommand.Path -Parent
|
4 | 4 |
|
@@ -26,21 +26,21 @@ if (!(Test-Path -Path $dropLocation -PathType Container))
|
26 | 26 |
|
27 | 27 |
|
28 | 28 |
|
29 |
| -if (!($excludeCommandPackages.IsPresent)) |
30 |
| -{ |
31 |
| - # Grap all command packages to build. |
32 |
| - # We'll assume that all directories that contain a *.nuspec.template file is a command package and that the name of the package is everything leading up to .nuspec.template |
33 |
| - $commandPackages = Get-ChildItem -path $sourcesRoot -Filter '*.nuspec.template' -Recurse -File | ForEach-Object { New-Object PSObject -Property @{Directory=$_.DirectoryName; Package=$_.Name.Substring(0, $_.Name.Length - ".nuspec.template".Length)} } |
| 29 | +# Grab all command packages to build. |
| 30 | +# We'll assume that all directories that contain a *.nuspec.template file is a command package and that the name of the package is everything leading up to .nuspec.template |
| 31 | +$commandPackages = Get-ChildItem -path $sourcesRoot -Filter '*.nuspec.template' -Recurse -File | |
| 32 | + ForEach-Object { New-Object PSObject -Property @{Directory=$_.DirectoryName; Package=$_.Name.Substring(0, $_.Name.Length - ".nuspec.template".Length)} } | |
| 33 | + Where-Object -Property Package -Like -Value $commandPackagesToBuild | |
| 34 | + Where-Object -Property Package -NotLike -Value $exceptCommandPackagesToBuild |
34 | 35 |
|
35 |
| - foreach($commandPackage in $commandPackages) |
36 |
| - { |
37 |
| - $commandPackageName = $commandPackage.Package |
38 |
| - $commandPackageDir = $commandPackage.Directory |
39 |
| - $buildOutputDirectory = Join-Path -path $commandPackageDir -ChildPath "bin\Debug\publish" |
| 36 | +foreach($commandPackage in $commandPackages) |
| 37 | +{ |
| 38 | + $commandPackageName = $commandPackage.Package |
| 39 | + $commandPackageDir = $commandPackage.Directory |
| 40 | + $buildOutputDirectory = Join-Path -path $commandPackageDir -ChildPath "bin\Debug\publish" |
40 | 41 |
|
41 | 42 |
|
42 |
| - Invoke-Expression "& $buildProfileScriptPath $commandPackageDir $commandPackageName $buildOutputDirectory $packageVersion $dropLocation\CommandRepo" |
43 |
| - } |
| 43 | + Invoke-Expression "& $buildProfileScriptPath $commandPackageDir $commandPackageName $buildOutputDirectory $packageVersion $dropLocation\CommandRepo" |
44 | 44 | }
|
45 | 45 |
|
46 | 46 | if (!($excludeCluRun))
|
|
0 commit comments