mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-06 12:09:40 +00:00
build.ps1 - Update version number via UpdateNugetPackages.ps1
Resolves #4418
This commit is contained in:
@@ -47,6 +47,19 @@ function RemoveEnsureNuGetPackageBuildImports
|
||||
}
|
||||
}
|
||||
|
||||
function WriteVersionToPowershellBuildScript
|
||||
{
|
||||
param([Parameter(Position = 0, ValueFromPipeline = $true)][string] $VersionNo)
|
||||
|
||||
$Filename = Join-Path $WorkingDir build.ps1
|
||||
|
||||
$buildScriptData = Get-Content -Encoding UTF8 $Filename
|
||||
$NewString = $buildScriptData -replace 'Version = "[\d\.]+"', ('Version = "' + $VersionNo + '"')
|
||||
|
||||
$Utf8NoBomEncoding = New-Object System.Text.UTF8Encoding $False
|
||||
[System.IO.File]::WriteAllLines($Filename, $NewString, $Utf8NoBomEncoding)
|
||||
}
|
||||
|
||||
if ($CefSharpVersion -eq "")
|
||||
{
|
||||
$CefSharpVersion = $CefVersion + "0"
|
||||
@@ -96,4 +109,6 @@ foreach($file in $csprojFiles)
|
||||
$xml.Save( $file )
|
||||
}
|
||||
|
||||
WriteVersionToPowershellBuildScript $CefSharpVersion
|
||||
|
||||
.\build.ps1 -Target update-build-version -Version $CefSharpVersion -AssemblyVersion $CefSharpVersion
|
||||
Reference in New Issue
Block a user