-
Notifications
You must be signed in to change notification settings - Fork 245
/
Copy pathMicrosoft.Playwright.targets
67 lines (67 loc) · 5.01 KB
/
Microsoft.Playwright.targets
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="UTF-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopyPlaywrightFilesToOutput" AfterTargets="ResolveAssemblyReferences">
<PropertyGroup>
<PlaywrightPlatform Condition="'$(PlaywrightPlatform)' == ''">%(RuntimePack.RuntimeIdentifier)</PlaywrightPlatform>
<PlaywrightPlatform Condition="'$(PlaywrightPlatform)' == ''">$(RuntimeIdentifier)</PlaywrightPlatform>
<PlaywrightPlatform Condition="'$(PlaywrightPlatform)' == ''">$(RuntimeIdentifiers)</PlaywrightPlatform>
<PlaywrightPlatform Condition="'$(PlaywrightPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Linux')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">linux-x64</PlaywrightPlatform>
<PlaywrightPlatform Condition="'$(PlaywrightPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Linux')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">linux-arm64</PlaywrightPlatform>
<PlaywrightPlatform Condition="'$(PlaywrightPlatform)' == '' AND $([MSBuild]::IsOSPlatform('Windows'))">win</PlaywrightPlatform>
<PlaywrightPlatform Condition="'$(PlaywrightPlatform)' == '' AND $([MSBuild]::IsOSPlatform('OSX')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'X64'">osx-x64</PlaywrightPlatform>
<PlaywrightPlatform Condition="'$(PlaywrightPlatform)' == '' AND $([MSBuild]::IsOSPlatform('OSX')) AND '$([System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture)' == 'Arm64'">osx-arm64</PlaywrightPlatform>
</PropertyGroup>
<ItemGroup Condition="'$(PlaywrightPlatform)' != 'none'">
<_PlaywrightPlatforms Include="$(PlaywrightPlatform)" />
<!-- 'linux' to stay backwards compatible -->
<_PlaywrightCopyItems Include="$(MSBuildThisFileDirectory)..\.playwright\node\linux-x64\**" Condition="'%(_PlaywrightPlatforms.Identity)' == 'linux' OR '%(_PlaywrightPlatforms.Identity)' == 'linux-x64'">
<PlaywrightFolder>node\linux-x64\</PlaywrightFolder>
</_PlaywrightCopyItems>
<_PlaywrightCopyItems Include="$(MSBuildThisFileDirectory)..\.playwright\node\linux-arm64\**" Condition="'%(_PlaywrightPlatforms.Identity)' == 'linux-arm64'">
<PlaywrightFolder>node\linux-arm64\</PlaywrightFolder>
</_PlaywrightCopyItems>
<!-- 'osx' to stay backwards compatible -->
<_PlaywrightCopyItems Include="$(MSBuildThisFileDirectory)..\.playwright\node\darwin-x64\**" Condition="'%(_PlaywrightPlatforms.Identity)' == 'osx' OR '%(_PlaywrightPlatforms.Identity)' == 'osx-x64'">
<PlaywrightFolder>node\darwin-x64\</PlaywrightFolder>
</_PlaywrightCopyItems>
<_PlaywrightCopyItems Include="$(MSBuildThisFileDirectory)..\.playwright\node\darwin-arm64\**" Condition="'%(_PlaywrightPlatforms.Identity)' == 'osx-arm64'">
<PlaywrightFolder>node\darwin-arm64\</PlaywrightFolder>
</_PlaywrightCopyItems>
<_PlaywrightCopyItems Include="$(MSBuildThisFileDirectory)..\.playwright\node\win32_x64\**" Condition="'%(_PlaywrightPlatforms.Identity)' == 'win' OR '%(_PlaywrightPlatforms.Identity)' == 'win-x64'">
<PlaywrightFolder>node\win32_x64\</PlaywrightFolder>
</_PlaywrightCopyItems>
<_PlaywrightCopyItems Include="$(MSBuildThisFileDirectory)..\.playwright\node\**" Condition="'@(_PlaywrightCopyItems->Count())' == '0'">
<PlaywrightFolder>node\</PlaywrightFolder>
</_PlaywrightCopyItems>
<_PlaywrightCopyItems Include="$(MSBuildThisFileDirectory)..\.playwright\node\LICENSE">
<PlaywrightFolder>node\</PlaywrightFolder>
</_PlaywrightCopyItems>
<_PlaywrightCopyItems Include="$(MSBuildThisFileDirectory)..\.playwright\package\**">
<PlaywrightFolder>package\</PlaywrightFolder>
</_PlaywrightCopyItems>
</ItemGroup>
<ItemGroup>
<Content Include="@(_PlaywrightCopyItems)">
<Link>.playwright\%(_PlaywrightCopyItems.PlaywrightFolder)%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PublishState>Included</PublishState>
<Visible>false</Visible>
<Pack>false</Pack>
</Content>
<Content Include="$(MSBuildThisFileDirectory)playwright.ps1">
<Link>playwright.ps1</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<PublishState>Included</PublishState>
<Visible>false</Visible>
<Pack>false</Pack>
</Content>
</ItemGroup>
</Target>
<Target Name="PlaywrightChmodExecutables" AfterTargets="CopyFilesToOutputDirectory;CopyFilesToPublishDirectory" Condition="!$([MSBuild]::IsOSPlatform('Windows'))">
<ItemGroup>
<_PlaywrightChmodItems Include="$([MSBuild]::EnsureTrailingSlash('$(OutputPath)')).playwright\node\*\node" />
<_PlaywrightChmodItems Include="$([MSBuild]::EnsureTrailingSlash('$(PublishDir)')).playwright\node\*\node" />
</ItemGroup>
<Exec Command="chmod +x "%(_PlaywrightChmodItems.FullPath)"" Condition="'@(_PlaywrightChmodItems->Count())' != '0'" />
</Target>
</Project>