obsproject / obs-plugintemplate

GNU General Public License v2.0
302 stars 138 forks source link

Running Build-Windows.ps1 appends \r\n to CMakeLists.txt every run #49

Closed ipatix closed 2 years ago

ipatix commented 2 years ago

Operating System Info

Windows 10

Other OS

No response

OBS Studio Version

28.0.1

OBS Studio Version (Other)

No response

OBS Studio Log URL

N/A

OBS Studio Crash Log URL

N/A

Expected Behavior

I'd expect the CMakeLists.txt to remain unchanged when running a build script. I understand this script is intended to be used in CI, but it is conventient to be used locally for development but then forces you to undo these line additions.

Current Behavior

Every time I run Build-Windows.ps1, I get one more line and they cause annoying diffs like this:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 317be39..07734aa 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -83,3 +83,6 @@ endif()
 # --- End of section ---

 setup_plugin_target(${CMAKE_PROJECT_NAME})
+
+
+

Although not visible in this diff, these newlines are DOS style line endings even if the CMakeLists.txt is Unix style.

Steps to Reproduce

  1. git clone "https://github.com/obsproject/obs-plugintemplate"
  2. cd obs-plugintemplate
  3. .\.github\scripts\Build-Windows.ps1
  4. script run completes
  5. CMakeLists.txt is altered

Anything else we should know?

No response

RytoEX commented 2 years ago

I've confirmed and isolated this behavior. Will PR a fix shortly.

ipatix commented 2 years ago

Thanks!