Skip to content

Windows shell replacement in Rust: taskbar, file manager, NTFS search, task manager, disk cleaner. One installer exe.

Rust

release.ps1: pass release notes through a file

Lemxyf1218799faa5
diff --git a/scripts/release.ps1 b/scripts/release.ps1
index b8a5c89..e0fa12d 100644
--- a/scripts/release.ps1
+++ b/scripts/release.ps1
@@ -12,5 +12,12 @@ $exe = Join-Path $env:TEMP 'WinRust.exe'
Copy-Item "$root\target\release\plugin-launcher.exe" $exe -Force
git tag $Version
git push origin $Version
-if ($Notes) { gh release create $Version $exe --repo Lemxy/WinRust --title "WinRust $Version" --notes $Notes }
+if ($Notes) {
+ # through a file: Windows PowerShell mangles double quotes inside a multi-line argument to a native exe
+ $nf = Join-Path $env:TEMP "winrust-notes-$Version.md"
+ [IO.File]::WriteAllText($nf, $Notes, (New-Object Text.UTF8Encoding $false))
+ gh release create $Version $exe --repo Lemxy/WinRust --title "WinRust $Version" --notes-file $nf
+ Remove-Item $nf
+}
else { gh release create $Version $exe --repo Lemxy/WinRust --title "WinRust $Version" --generate-notes }
+if ($LASTEXITCODE) { throw "gh release create failed (the tag $Version is already pushed: rerun only this step)" }