From d2299199ba4ca0e4906b55528dd5ae5c9f4271a5 Mon Sep 17 00:00:00 2001 From: Shahovalov MIkhail Date: Fri, 10 Apr 2026 12:23:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BA=D0=BE=D0=B4=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20meta.lsx=20=D0=B8=20=D0=B2=D1=8B=D0=BF=D1=83?= =?UTF-8?q?=D1=89=D0=B5=D0=BD=20hotfix=20v0.2.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Mods/DnD 5.5e AIO Russian/meta.lsx | 8 ++++---- scripts/build.ps1 | 6 +++--- scripts/set-version.ps1 | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Mods/DnD 5.5e AIO Russian/meta.lsx b/Mods/DnD 5.5e AIO Russian/meta.lsx index dc92894..a5b5b10 100644 --- a/Mods/DnD 5.5e AIO Russian/meta.lsx +++ b/Mods/DnD 5.5e AIO Russian/meta.lsx @@ -1,4 +1,4 @@ - + @@ -9,11 +9,11 @@ - + - + @@ -32,7 +32,7 @@ - + diff --git a/scripts/build.ps1 b/scripts/build.ps1 index c49dd8f..7304e46 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -101,10 +101,10 @@ if (-not (Test-Path -LiteralPath $stagedMetaPath)) { throw "Staged meta.lsx was not found: '$stagedMetaPath'." } -$stagedMetaContent = Get-Content -LiteralPath $stagedMetaPath -Raw +$utf8Encoding = [System.Text.UTF8Encoding]::new($false) +$stagedMetaContent = [System.IO.File]::ReadAllText($stagedMetaPath, $utf8Encoding) $stagedMetaContent = $stagedMetaContent -replace '()', "`${1}$resolvedVersion64`${2}" -$utf8Bom = New-Object System.Text.UTF8Encoding($true) -[System.IO.File]::WriteAllText($stagedMetaPath, $stagedMetaContent, $utf8Bom) +[System.IO.File]::WriteAllText($stagedMetaPath, $stagedMetaContent, $utf8Encoding) Write-Host "[build.ps1] Staged source tree:" Get-ChildItem -Recurse $stagingPath | Select-Object FullName, Length | Format-Table -AutoSize diff --git a/scripts/set-version.ps1 b/scripts/set-version.ps1 index 2387f5b..0822393 100644 --- a/scripts/set-version.ps1 +++ b/scripts/set-version.ps1 @@ -35,7 +35,8 @@ if (-not (Test-Path -LiteralPath $resolvedMetaPath)) { } $resolvedVersion64 = Convert-VersionTagToVersion64 -Tag $VersionTag -$metaContent = Get-Content -LiteralPath $resolvedMetaPath -Raw +$utf8Encoding = [System.Text.UTF8Encoding]::new($false) +$metaContent = [System.IO.File]::ReadAllText($resolvedMetaPath, $utf8Encoding) [xml]$metaXml = $metaContent # Explicitly target ModuleInfo/Version64 via XML path to avoid touching Dependencies/PublishVersion. @@ -57,7 +58,6 @@ $updatedMeta = [regex]::Replace( 1 ) -$utf8Bom = New-Object System.Text.UTF8Encoding($true) -[System.IO.File]::WriteAllText($resolvedMetaPath, $updatedMeta, $utf8Bom) +[System.IO.File]::WriteAllText($resolvedMetaPath, $updatedMeta, $utf8Encoding) Write-Host "[set-version.ps1] Updated '$resolvedMetaPath' to Version64=$resolvedVersion64 (from tag '$VersionTag')."