Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 13 additions & 13 deletions tools/CLU/BuildDrop.ps1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
param([string]$dropLocation, [string]$packageVersion="0.0.1", [switch] $excludeCommandPackages, [switch] $excludeCluRun)
param([string]$dropLocation, [string]$packageVersion="0.0.1", [string] $commandPackagesToBuild = "*", [string] $exceptCommandPackagesToBuild, [switch] $excludeCluRun)

$thisScriptDirectory = Split-Path $MyInvocation.MyCommand.Path -Parent

Expand Down Expand Up @@ -26,21 +26,21 @@ if (!(Test-Path -Path $dropLocation -PathType Container))



if (!($excludeCommandPackages.IsPresent))
{
# Grap all command packages to build.
# 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
$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)} }
# Grab all command packages to build.
# 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
$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)} } |
Where-Object -Property Package -Like -Value $commandPackagesToBuild |
Where-Object -Property Package -NotLike -Value $exceptCommandPackagesToBuild

foreach($commandPackage in $commandPackages)
{
$commandPackageName = $commandPackage.Package
$commandPackageDir = $commandPackage.Directory
$buildOutputDirectory = Join-Path -path $commandPackageDir -ChildPath "bin\Debug\publish"
foreach($commandPackage in $commandPackages)
{
$commandPackageName = $commandPackage.Package
$commandPackageDir = $commandPackage.Directory
$buildOutputDirectory = Join-Path -path $commandPackageDir -ChildPath "bin\Debug\publish"


Invoke-Expression "& $buildProfileScriptPath $commandPackageDir $commandPackageName $buildOutputDirectory $packageVersion $dropLocation\CommandRepo"
}
Invoke-Expression "& $buildProfileScriptPath $commandPackageDir $commandPackageName $buildOutputDirectory $packageVersion $dropLocation\CommandRepo"
}

if (!($excludeCluRun))
Expand Down