mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2025-05-23 11:16:59 -04:00
Use UTF8 encoding in UpdateVersion.ps1
This commit is contained in:
parent
c446d4069a
commit
01d276a9dc
1 changed files with 3 additions and 3 deletions
|
@ -3,9 +3,9 @@ param([string] $newVersion)
|
|||
function Replace-TextInFile {
|
||||
param([string] $filePath, [string] $pattern, [string] $replacement)
|
||||
|
||||
$content = [System.IO.File]::ReadAllText($filePath)
|
||||
$content = [System.Text.RegularExpressions.Regex]::Replace($content, $pattern, $replacement)
|
||||
[System.IO.File]::WriteAllText($filePath, $content)
|
||||
$content = [IO.File]::ReadAllText($filePath)
|
||||
$content = [Text.RegularExpressions.Regex]::Replace($content, $pattern, $replacement)
|
||||
[IO.File]::WriteAllText($filePath, $content, [Text.Encoding]::UTF8)
|
||||
}
|
||||
|
||||
Replace-TextInFile "$PSScriptRoot\DiscordChatExporter.Core\DiscordChatExporter.Core.csproj" '(?<=<Version>)(.*?)(?=</Version>)' $newVersion
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue