From ba10dc56e0acf8a95c61004c73a5a8e1787cde24 Mon Sep 17 00:00:00 2001 From: Takuya Takeuchi Date: Fri, 12 Jul 2019 22:25:41 +0900 Subject: [PATCH] fix: ignore configuration param for linux and osx --- nuget/BuildOSX.ps1 | 2 +- nuget/BuildUbuntu16.ps1 | 2 +- nuget/BuildUtils.ps1 | 19 +++++++++++++++---- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/nuget/BuildOSX.ps1 b/nuget/BuildOSX.ps1 index ff5585a2..358c81ce 100644 --- a/nuget/BuildOSX.ps1 +++ b/nuget/BuildOSX.ps1 @@ -55,7 +55,7 @@ foreach($BuildTarget in $BuildTargets) $dll = $BuildSourceHash[$key] $dstDir = Join-Path $Current $libraryDir - CopyToArtifact -configuration "Release" -srcDir $srcDir -build $build -libraryName $dll -dstDir $dstDir -rid $rid + CopyToArtifact -srcDir $srcDir -build $build -libraryName $dll -dstDir $dstDir -rid $rid } } diff --git a/nuget/BuildUbuntu16.ps1 b/nuget/BuildUbuntu16.ps1 index 97329e75..1b3e4741 100644 --- a/nuget/BuildUbuntu16.ps1 +++ b/nuget/BuildUbuntu16.ps1 @@ -97,7 +97,7 @@ foreach($BuildTarget in $BuildTargets) $dll = $BuildSourceHash[$key] $dstDir = Join-Path $Current $libraryDir - CopyToArtifact -configuration "Release" -srcDir $srcDir -build $build -libraryName $dll -dstDir $dstDir -rid $rid + CopyToArtifact -srcDir $srcDir -build $build -libraryName $dll -dstDir $dstDir -rid $rid } } diff --git a/nuget/BuildUtils.ps1 b/nuget/BuildUtils.ps1 index d623ce4d..4356d7d7 100644 --- a/nuget/BuildUtils.ps1 +++ b/nuget/BuildUtils.ps1 @@ -416,11 +416,22 @@ function Build([Config]$Config) Set-Location -Path $Current } -function CopyToArtifact([string]$configuration, [string]$srcDir, [string]$build, [string]$libraryName, [string]$dstDir, [string]$rid) +function CopyToArtifact() { - $binary = Join-Path ${srcDir} ${build} | ` - Join-Path -ChildPath ${configuration} | ` - Join-Path -ChildPath ${libraryName} + Param([string]$srcDir, [string]$build, [string]$libraryName, [string]$dstDir, [string]$rid, [string]$configuration="") + + if ($configuration) + { + $binary = Join-Path ${srcDir} ${build} | ` + Join-Path -ChildPath ${configuration} | ` + Join-Path -ChildPath ${libraryName} + } + else + { + $binary = Join-Path ${srcDir} ${build} | ` + Join-Path -ChildPath ${libraryName} + } + $output = Join-Path $dstDir runtimes | ` Join-Path -ChildPath ${rid} | ` Join-Path -ChildPath native | `