Skip to content

Commit

Permalink
[dotnet] Bundle smg into nuget package and copy binaries to users output
Browse files Browse the repository at this point in the history
  • Loading branch information
nvborisenko authored and titusfortner committed Oct 31, 2022
1 parent d83c0ef commit 2e416b8
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 12 deletions.
1 change: 1 addition & 0 deletions common/manager/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ exports_files(
"//java/test/org/openqa/selenium/firefox:__pkg__",
"//py:__pkg__",
"//rb:__pkg__",
"//dotnet/src/webdriver:__pkg__",
],
)
14 changes: 14 additions & 0 deletions dotnet/src/webdriver/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,18 @@ copy_file(
out = "icon.png",
)

copy_file(
name = "props",
src = "build/WebDriver.props",
out = "Selenium.WebDriver.props",
)

copy_file(
name = "manager-windows",
src = "//common/manager:windows/selenium-manager.exe",
out = "manager/windows/selenium-manager.exe",
)

nuget_package(
name = "package",
src = "WebDriver.nuspec",
Expand All @@ -253,6 +265,8 @@ nuget_package(
visibility = ["//visibility:public"],
deps = [
":logo",
":props",
":manager-windows",
":net45",
":net46",
":net47",
Expand Down
8 changes: 0 additions & 8 deletions dotnet/src/webdriver/WebDriver.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,6 @@
<Visible>False</Visible>
<LogicalName>webdriver_prefs.json</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="$(ProjectDir)..\..\..\common\manager\windows\selenium-manager.exe">
<Visible>False</Visible>
<LogicalName>selenium-manager-windows</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="$(ProjectDir)..\..\..\bazel-bin\javascript\webdriver\atoms\get-attribute.js">
<Visible>False</Visible>
<LogicalName>get-attribute.js</LogicalName>
Expand All @@ -144,10 +140,6 @@
<Visible>False</Visible>
<LogicalName>webdriver_prefs.json</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="$(ProjectDir)../../../common/manager/windows/selenium-manager.exe">
<Visible>False</Visible>
<LogicalName>selenium-manager-windows</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="$(ProjectDir)../../../bazel-bin/javascript/webdriver/atoms/get-attribute.js">
<Visible>False</Visible>
<LogicalName>get-attribute.js</LogicalName>
Expand Down
10 changes: 6 additions & 4 deletions dotnet/src/webdriver/WebDriver.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@
</frameworkAssemblies>
</metadata>
<files>
<file src="**/WebDriver.dll" target="lib" />
<file src="**/WebDriver.pdb" target="lib" />
<file src="**/WebDriver.xml" target="lib" />
<file src="../icon.png" target="images\" />
<file src="**\WebDriver.dll" target="lib" />
<file src="**\WebDriver.pdb" target="lib" />
<file src="**\WebDriver.xml" target="lib" />
<file src="..\icon.png" target="images" />
<file src="..\manager\**" target="tools" />
<file src="..\Selenium.WebDriver.props" target="build" />
</files>
</package>
12 changes: 12 additions & 0 deletions dotnet/src/webdriver/build/WebDriver.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<ItemGroup>
<None Include="$(MSBuildThisFileDirectory)..\tools\windows\selenium-manager.exe">
<Link>selenium-manager\windows\%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Visible>False</Visible>
</None>
</ItemGroup>

</Project>

0 comments on commit 2e416b8

Please sign in to comment.