Skip to content

Commit

Permalink
Prevent extra newlines in CMakeLists.txt after building
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
RytoEX authored and PatTheMav committed Oct 13, 2022
1 parent 5db14e5 commit 6bf2a15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/scripts/Build-Windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 6bf2a15

Please sign in to comment.