Update build.ps1 to extract the cef.redist version from the CefSharp.Core\packages.config file

Saves updating this file manually
This commit is contained in:
amaitland
2016-06-07 08:14:49 +10:00
parent e4c9598b8b
commit b10a7efae4
+8 -4
View File
@@ -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