Skip to content

Commit b10a7ef

Browse files
committed
Update build.ps1 to extract the cef.redist version from the CefSharp.Core\packages.config file
Saves updating this file manually
1 parent e4c9598 commit b10a7ef

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

build.ps1

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@ param(
55
[Parameter(Position = 1)]
66
[string] $Version = "51.0.0",
77
[Parameter(Position = 2)]
8-
[string] $AssemblyVersion = "51.0.0",
9-
[Parameter(Position = 3)]
10-
[string] $RedistVersion = "3.2704.1418"
8+
[string] $AssemblyVersion = "51.0.0"
119
)
1210

1311
$WorkingDir = split-path -parent $MyInvocation.MyCommand.Definition
14-
1512
$CefSln = Join-Path $WorkingDir 'CefSharp3.sln'
1613

14+
# Extract the current CEF Redist version from the CefSharp.Core\packages.config file
15+
# Save having to update this file manually Example 3.2704.1418
16+
$CefSharpCorePackagesXml = [xml](Get-Content (Join-Path $WorkingDir 'CefSharp.Core\Packages.config'))
17+
$RedistVersion = $CefSharpCorePackagesXml.SelectSingleNode("//packages/package[@id='cef.sdk']/@version").value
18+
1719
function Write-Diagnostic
1820
{
1921
param(
@@ -289,6 +291,8 @@ function WriteAssemblyVersion
289291
$NewString | Set-Content $Filename -Encoding UTF8
290292
}
291293

294+
Write-Diagnostic "CEF Redist Version = $RedistVersion"
295+
292296
DownloadNuget
293297

294298
NugetPackageRestore

0 commit comments

Comments
 (0)