瀏覽代碼

Prevent extra newlines in CMakeLists.txt after building

PowerShell's Out-File cmdlet by default writes a newline at the end of
the file. We can prevent this either by manually trimming the whitespace
before sending the output to Out-File, or simply using the -NoNewline
parameter for Out-File.

Fixes obsproject/obs-plugintemplate#49.
Ryan Foster 2 年之前
父節點
當前提交
6bf2a158be
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      .github/scripts/Build-Windows.ps1

+ 1 - 1
.github/scripts/Build-Windows.ps1

@@ -59,7 +59,7 @@ function Build {
 
     (Get-Content -Path ${ProjectRoot}/CMakeLists.txt -Raw) `
         -replace "project\((.*) VERSION (.*)\)", "project(${ProductName} VERSION ${ProductVersion})" `
-        | Out-File -Path ${ProjectRoot}/CMakeLists.txt
+        | Out-File -Path ${ProjectRoot}/CMakeLists.txt -NoNewline
 
     Setup-Obs