Commit ef0b2d82 authored by Nikita Titov's avatar Nikita Titov Committed by James Lamb
Browse files

[ci] use raw strings in NuGet helper script (#2710)

parent d9064282
......@@ -27,7 +27,7 @@ if __name__ == "__main__":
copy_file(os.path.join(source, "lib_lightgbm.dll"), os.path.join(windows_folder_path, "lib_lightgbm.dll"))
copy_file(os.path.join(source, "lightgbm.exe"), os.path.join(windows_folder_path, "lightgbm.exe"))
version = open(os.path.join(current_dir, os.path.pardir, 'VERSION.txt')).read().strip()
nuget_str = '''<?xml version="1.0"?>
nuget_str = r"""<?xml version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
<metadata>
<id>LightGBM</id>
......@@ -47,8 +47,8 @@ if __name__ == "__main__":
<file src="runtimes\**" target="runtimes"/>
</files>
</package>
''' % (version, datetime.datetime.now().year)
prop_str = '''
""" % (version, datetime.datetime.now().year)
prop_str = r"""
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Condition="Exists('packages.config') OR
Exists('$(MSBuildProjectName).packages.config') OR
......@@ -65,8 +65,8 @@ if __name__ == "__main__":
</Content>
</ItemGroup>
</Project>
'''
target_str = '''
"""
target_str = r"""
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<EnableLightGBMUnsupportedPlatformTargetCheck Condition="'$(EnableLightGBMUnsupportedPlatformTargetCheck)' == ''">true</EnableLightGBMUnsupportedPlatformTargetCheck>
......@@ -80,7 +80,7 @@ if __name__ == "__main__":
Text="LightGBM currently supports 'x64' processor architectures. Please ensure your application is targeting 'x64'." />
</Target>
</Project>
'''
"""
with open(os.path.join(current_dir, "LightGBM.nuspec"), "w") as nuget_file:
nuget_file.write(nuget_str)
with open(os.path.join(current_dir, "build", "LightGBM.props"), "w") as prop_file:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment