Skip to content

Commit c030d93

Browse files
committed
Build.ps1 - Update chromiumembeddedframework.runtime.json version number
Resolves #86
1 parent f22cd6d commit c030d93

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

NuGet/chromiumembeddedframework.runtime.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"runtimes": {
33
"win-x64": {
44
"CefSharp.Common.NETCore": {
5-
"chromiumembeddedframework.runtime.win-x86": "84.4.0"
5+
"chromiumembeddedframework.runtime.win-x86": "84.4.1"
66
}
77
},
88
"win-x86": {
99
"CefSharp.Common.NETCore": {
10-
"chromiumembeddedframework.runtime.win-x64": "84.4.0"
10+
"chromiumembeddedframework.runtime.win-x64": "84.4.1"
1111
}
1212
}
1313
}

build.ps1

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ try
357357
$cmake_path = "cmake.exe";
358358
if ($env:ChocolateyInstall -And (Test-Path ($env:ChocolateyInstall + "\bin\" + $cmake_path)))
359359
{
360-
$cmake_path = $env:ChocolateyInstall + "\bin\" + $cmake_path;
360+
$cmake_path = $env:ChocolateyInstall + "\bin\" + $cmake_path;
361361
}
362362
&"$cmake_path" --version
363363
Write-Diagnostic "Running cmake: $cmake_path -LAH -G '$CmakeGenerator' -A $Arch -DUSE_SANDBOX=Off -DCEF_RUNTIME_LIBRARY_FLAG=/MD ."
@@ -731,6 +731,21 @@ try
731731
Remove-Item $Folder
732732
}
733733
}
734+
735+
function WriteVersionToRuntimeJson
736+
{
737+
$Filename = Join-Path $WorkingDir NuGet\chromiumembeddedframework.runtime.json
738+
739+
Write-Diagnostic "Write Version ($CefPackageVersion) to $Filename"
740+
$Regex1 = '": ".*"';
741+
$Replace = '": "' + $CefPackageVersion + '"';
742+
743+
$RunTimeJsonData = Get-Content -Encoding UTF8 $Filename
744+
$NewString = $RunTimeJsonData -replace $Regex1, $Replace
745+
746+
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
747+
[System.IO.File]::WriteAllLines($Filename, $NewString, $Utf8NoBomEncoding)
748+
}
734749

735750
function CheckDependencies()
736751
{
@@ -748,6 +763,7 @@ try
748763
}
749764

750765
CheckDependencies
766+
WriteVersionToRuntimeJson
751767

752768
switch -Exact ($DownloadBinary)
753769
{

0 commit comments

Comments
 (0)