fix(scripts): write package manifest without utf-8 bom
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
6ba5e34d4b
commit
8640d12ac1
1 file changed
+4
-3
@@ -44,8 +44,9 @@ $meta = [ordered]@{
|
||||
framework = "net9.0"
|
||||
timestamp = $timestamp
|
||||
}
|
||||
$utf8NoBom = New-Object System.Text.UTF8Encoding $false
|
||||
$metaJson = $meta | ConvertTo-Json -Depth 5
|
||||
[System.IO.File]::WriteAllText((Join-Path $stageDir "meta.json"), $metaJson)
|
||||
[System.IO.File]::WriteAllText((Join-Path $stageDir "meta.json"), $metaJson, $utf8NoBom)
|
||||
Copy-Item $dllPath -Destination (Join-Path $stageDir "Jellyfin.Plugin.Request.dll")
|
||||
|
||||
$tempZip = Join-Path $releaseDir ("tmp_" + [guid]::NewGuid().ToString("N") + ".zip")
|
||||
@@ -81,10 +82,10 @@ $plugin = [ordered]@{
|
||||
versions = @($versionObj)
|
||||
}
|
||||
|
||||
# Jellyfin requires a JSON array root.
|
||||
# Jellyfin requires a JSON array root and no UTF-8 BOM.
|
||||
$pluginJson = ($plugin | ConvertTo-Json -Depth 8)
|
||||
$manifestJson = "[" + [Environment]::NewLine + $pluginJson + [Environment]::NewLine + "]"
|
||||
[System.IO.File]::WriteAllText($manifestPath, $manifestJson)
|
||||
[System.IO.File]::WriteAllText($manifestPath, $manifestJson, $utf8NoBom)
|
||||
|
||||
Write-Host "Packaged: $zipPath"
|
||||
Write-Host "Checksum: $checksum"
|
||||
|
||||
Reference in new issue
Block a user