Skip to content

Update build drop script to allow specifying which command packages t… #1468

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2015
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