From e813d756ac3ee3d5daf71393482ee50f003f52bb Mon Sep 17 00:00:00 2001 From: Faizan2304 Date: Wed, 25 Jan 2017 02:02:36 -0800 Subject: [PATCH] Localize nuget packages. (#376) * Localize nuget packages. (cherry picked from commit a08f6943f0e95a1170ac263514683474ab8babe7) --- scripts/build.ps1 | 11 +++--- scripts/build/TestPlatform.targets | 2 +- src/TestPlatform.ObjectModel.nuspec | 58 +++++++++++++++++++++++++++++ src/TestPlatform.TestHost.nuspec | 45 ++++++++++++++++++++++ 4 files changed, 110 insertions(+), 6 deletions(-) diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 7242f17a5a..63090b9646 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -33,7 +33,7 @@ Param( [Parameter(Mandatory=$false)] [Alias("loc")] - [Switch] $LocalizedBuild = $false, + [Switch] $DisableLocalizedBuild = $false, [Parameter(Mandatory=$false)] [Alias("ci")] @@ -75,6 +75,7 @@ $TPB_TargetRuntime = $TargetRuntime $TPB_Version = $Version $TPB_VersionSuffix = $VersionSuffix $TPB_CIBuild = $CIBuild +$TPB_LocalizedBuild = !$DisableLocalizedBuild $TPB_VSIX_DIR = Join-Path $env:TP_ROOT_DIR "src\VSIX" # Capture error state in any step globally to modify return code @@ -161,8 +162,8 @@ function Invoke-Build $dotnetExe = Get-DotNetPath Write-Log ".. .. Build: Source: $TPB_Solution" - Write-Verbose "$dotnetExe build $TPB_Solution --configuration $TPB_Configuration --version-suffix $TPB_VersionSuffix -v:minimal -p:Version=$TPB_Version" - & $dotnetExe build $TPB_Solution --configuration $TPB_Configuration --version-suffix $TPB_VersionSuffix -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$LocalizedBuild -p:SyncXlf=$SyncXlf + Write-Verbose "$dotnetExe build $TPB_Solution --configuration $TPB_Configuration --version-suffix $TPB_VersionSuffix -v:minimal -p:Version=$TPB_Version -p:LocalizedBuild=$TPB_LocalizedBuild -p:SyncXlf=$SyncXlf" + & $dotnetExe build $TPB_Solution --configuration $TPB_Configuration --version-suffix $TPB_VersionSuffix -v:minimal -p:Version=$TPB_Version -p:CIBuild=$TPB_CIBuild -p:LocalizedBuild=$TPB_LocalizedBuild -p:SyncXlf=$SyncXlf Write-Log ".. .. Build: Complete." if ($lastExitCode -ne 0) { @@ -256,8 +257,8 @@ function Publish-Package function Publish-Package-Internal($packagename, $framework, $output) { - Write-Verbose "$dotnetExe publish $packagename --configuration $TPB_Configuration --framework $framework --output $output -v:minimal -p:SyncXlf=$SyncXlf -p:LocalizedBuild=$LocalizedBuild" - & $dotnetExe publish $packagename --configuration $TPB_Configuration --framework $framework --output $output -v:minimal -p:SyncXlf=$SyncXlf -p:LocalizedBuild=$LocalizedBuild + Write-Verbose "$dotnetExe publish $packagename --configuration $TPB_Configuration --framework $framework --output $output -v:minimal -p:SyncXlf=$SyncXlf -p:LocalizedBuild=$TPB_LocalizedBuild" + & $dotnetExe publish $packagename --configuration $TPB_Configuration --framework $framework --output $output -v:minimal -p:SyncXlf=$SyncXlf -p:LocalizedBuild=$TPB_LocalizedBuild } function Create-VsixPackage diff --git a/scripts/build/TestPlatform.targets b/scripts/build/TestPlatform.targets index 91628c6ca4..9a1b06940f 100644 --- a/scripts/build/TestPlatform.targets +++ b/scripts/build/TestPlatform.targets @@ -28,7 +28,7 @@ - + diff --git a/src/TestPlatform.ObjectModel.nuspec b/src/TestPlatform.ObjectModel.nuspec index 3bda062304..b867959dba 100644 --- a/src/TestPlatform.ObjectModel.nuspec +++ b/src/TestPlatform.ObjectModel.nuspec @@ -57,5 +57,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/TestPlatform.TestHost.nuspec b/src/TestPlatform.TestHost.nuspec index 32ab54bcad..fa8466ff9e 100644 --- a/src/TestPlatform.TestHost.nuspec +++ b/src/TestPlatform.TestHost.nuspec @@ -21,6 +21,7 @@ + @@ -31,5 +32,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +