Create test packages directory

This commit is contained in:
piotrp 2016-01-10 23:06:02 -08:00
parent 9a615ff242
commit ac0dc9a666
2 changed files with 15 additions and 5 deletions

View file

@ -5,12 +5,17 @@
. "$PSScriptRoot\..\common\_common.ps1"
$TestPackagesPath = "$RepoRoot\tests\packages"
if((Test-Path $TestPackagesPath) -eq 0)
{
mkdir $TestPackagesPath;
}
"v1", "v2" |
foreach {
dotnet pack "$RepoRoot\test\PackagedCommands\Commands\dotnet-hello\$_\dotnet-hello"
cp "$RepoRoot\test\PackagedCommands\Commands\dotnet-hello\$_\dotnet-hello\bin\Debug\*.nupkg" -Destination "$RepoRoot\artifacts\packages"
cp "$RepoRoot\test\PackagedCommands\Commands\dotnet-hello\$_\dotnet-hello\bin\Debug\*.nupkg" -Destination $TestPackagesPath
if (!$?) {
error "Command failed: dotnet pack"
Exit 1
@ -27,7 +32,7 @@ foreach {
#restore test projects
pushd "$RepoRoot\test\PackagedCommands\Consumers"
dotnet restore -s "$RepoRoot\artifacts\packages" --no-cache --ignore-failed-sources --parallel
dotnet restore -s "$TestPackagesPath" --no-cache --ignore-failed-sources --parallel
if (!$?) {
error "Command failed: dotnet restore"
Exit 1