fix(release): preserve UTF-8 when rewriting core/version.py
This commit is contained in:
parent
63b0e324b9
commit
71161b2707
@ -4,4 +4,4 @@
|
|||||||
릴리스 시 이 값을 올린 후 git tag → push.
|
릴리스 시 이 값을 올린 후 git tag → push.
|
||||||
CHANGELOG.md의 최상단 항목과 일치시킬 것.
|
CHANGELOG.md의 최상단 항목과 일치시킬 것.
|
||||||
"""
|
"""
|
||||||
__version__ = '2.11.2'
|
__version__ = '2.12.0'
|
||||||
|
|||||||
@ -86,12 +86,12 @@ OkMsg "All checks passed (Version: $Version)"
|
|||||||
# ====== 1. Bump version.py ======
|
# ====== 1. Bump version.py ======
|
||||||
Step "1/7 Bump core/version.py"
|
Step "1/7 Bump core/version.py"
|
||||||
$verFile = 'core/version.py'
|
$verFile = 'core/version.py'
|
||||||
$verContent = Get-Content $verFile -Raw
|
$verContent = [System.IO.File]::ReadAllText((Resolve-Path $verFile).Path, [System.Text.Encoding]::UTF8)
|
||||||
$newContent = $verContent -replace "__version__ = '[^']+'", "__version__ = '$VersionRaw'"
|
$newContent = $verContent -replace "__version__ = '[^']+'", "__version__ = '$VersionRaw'"
|
||||||
if ($verContent -eq $newContent) {
|
if ($verContent -eq $newContent) {
|
||||||
Info "Already at $VersionRaw (no change)"
|
Info "Already at $VersionRaw (no change)"
|
||||||
} else {
|
} else {
|
||||||
if (-not $DryRun) { Set-Content $verFile -Value $newContent -NoNewline }
|
if (-not $DryRun) { [System.IO.File]::WriteAllText((Resolve-Path $verFile).Path, $newContent, [System.Text.Encoding]::UTF8) }
|
||||||
OkMsg "$verFile -> $VersionRaw"
|
OkMsg "$verFile -> $VersionRaw"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user