From b10a7efae459fb10404eda504567f4ad7f2b8fa4 Mon Sep 17 00:00:00 2001 From: amaitland Date: Tue, 7 Jun 2016 08:14:49 +1000 Subject: [PATCH] Update build.ps1 to extract the cef.redist version from the CefSharp.Core\packages.config file Saves updating this file manually --- build.ps1 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/build.ps1 b/build.ps1 index c8289010d..62eefb2a6 100644 --- a/build.ps1 +++ b/build.ps1 @@ -5,15 +5,17 @@ param( [Parameter(Position = 1)] [string] $Version = "51.0.0", [Parameter(Position = 2)] - [string] $AssemblyVersion = "51.0.0", - [Parameter(Position = 3)] - [string] $RedistVersion = "3.2704.1418" + [string] $AssemblyVersion = "51.0.0" ) $WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition - $CefSln = Join-Path $WorkingDir 'CefSharp3.sln' +# Extract the current CEF Redist version from the CefSharp.Core\packages.config file +# Save having to update this file manually Example 3.2704.1418 +$CefSharpCorePackagesXml = [xml](Get-Content (Join-Path $WorkingDir 'CefSharp.Core\Packages.config')) +$RedistVersion = $CefSharpCorePackagesXml.SelectSingleNode("//packages/package[@id='cef.sdk']/@version").value + function Write-Diagnostic { param( @@ -289,6 +291,8 @@ function WriteAssemblyVersion $NewString | Set-Content $Filename -Encoding UTF8 } +Write-Diagnostic "CEF Redist Version = $RedistVersion" + DownloadNuget NugetPackageRestore