Skip to content

Commit bdf671e

Browse files
authored
fixed new line character at the end of informational version (#1941)
1 parent 4241493 commit bdf671e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

Directory.Build.props

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<AssemblyProduct>Python.NET</AssemblyProduct>
77
<LangVersion>10.0</LangVersion>
88
<IsPackable>false</IsPackable>
9-
<FullVersion>$([System.IO.File]::ReadAllText("version.txt"))</FullVersion>
9+
<FullVersion>$([System.IO.File]::ReadAllText("version.txt").Trim())</FullVersion>
1010
<VersionPrefix>$(FullVersion.Split('-', 2)[0])</VersionPrefix>
1111
<VersionSuffix Condition="$(FullVersion.Contains('-'))">$(FullVersion.Split('-', 2)[1])</VersionSuffix>
1212
</PropertyGroup>

pythonnet.sln

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repo", "Repo", "{441A0123-F
2121
CHANGELOG.md = CHANGELOG.md
2222
LICENSE = LICENSE
2323
README.rst = README.rst
24+
version.txt = version.txt
2425
EndProjectSection
2526
EndProject
2627
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CI", "CI", "{D301657F-5EAF-4534-B280-B858D651B2E5}"

tests/test_module.py

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def test_import_clr():
3131
def test_version_clr():
3232
import clr
3333
assert clr.__version__ >= "3.0.0"
34+
assert clr.__version__[-1] != "\n"
3435

3536

3637
def test_preload_var():

0 commit comments

Comments
 (0)