Skip to content
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.

Commit

Permalink
Codegen line endings (#1189)
Browse files Browse the repository at this point in the history
* Have the code generator fix up the line endings after generations

* Internal changelog
  • Loading branch information
zeroZshadow authored Oct 15, 2019
1 parent c55e363 commit 69b19da
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
### Internal

- Added the `IComponentMetaclass` and `ICommandMetaclass` interfaces. Where we previously would use reflection to find instances of various component/command related types, we now lookup through generated metaclasses. [#1173](https://github.com/spatialos/gdk-for-unity/pull/1173)
- Code Generator now enforces platform line endings. [#1189](https://github.com/spatialos/gdk-for-unity/pull/1189)

## `0.2.9` - 2019-09-16

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ public void Run()
fileSystem.CreateDirectory(fileInfo.DirectoryPath);
}

fileSystem.WriteToFile(fileInfo.CompletePath, entry.Value);
// Fix up line endings
var contents = entry.Value
.Replace("\r\n", "\n")
.Replace("\n", Environment.NewLine);

fileSystem.WriteToFile(fileInfo.CompletePath, contents);
}
}

Expand Down

0 comments on commit 69b19da

Please sign in to comment.