Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[mono][tests] Use RecursiveDir property to create app bundle for Helix #89508

Merged
merged 1 commit into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 6 additions & 14 deletions eng/testing/tests.ioslike.targets
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,13 @@
</PropertyGroup>

<ItemGroup>
<!--
Checks if the directory name "AppleAssembliesToBundle" is equal to the "AssemblyName",
if they match, consider it as the root directory and copy the files there,
otherwise, copy the files to a subdirectory.
-->
<BundleFiles Condition="'%(AppleAssembliesToBundle._IsNative)' != 'true' and ($([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName('%(AppleAssembliesToBundle.Identity)')))) == '$(AssemblyName)' or '$(IsRuntimeTests)' != 'true')"
Include="@(AppleAssembliesToBundle)" TargetDir="publish" />
<BundleFiles Condition="'%(AppleAssembliesToBundle._IsNative)' != 'true' and $([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName('%(AppleAssembliesToBundle.Identity)')))) != '$(AssemblyName)' and '$(IsRuntimeTests)' == 'true'"
Include="@(AppleAssembliesToBundle)" TargetDir="publish\$([System.IO.Path]::GetFileName($([System.IO.Path]::GetDirectoryName('%(AppleAssembliesToBundle.Identity)'))))" />

<BundleFiles Include="@(AppleNativeFilesToBundle)" TargetDir="publish" />

<BundleFiles Include="$(MonoProjectRoot)\msbuild\apple\data\*" TargetDir="publish" />
<BundleFiles Condition="'%(AppleAssembliesToBundle._IsNative)' != 'true'"
Include="@(AppleAssembliesToBundle)" TargetDir="publish\%(AppleAssembliesToBundle.RecursiveDir)" />
<BundleFiles Include="@(AppleNativeFilesToBundle)" TargetDir="publish\%(AppleNativeFilesToBundle.RecursiveDir)" />
<BundleFiles Include="$(RuntimeConfigFilePath)" TargetDir="publish" />
<BundleFiles Include="$(MonoProjectRoot)\msbuild\apple\data\*" TargetDir="publish" />
<ExtraFiles Condition="'%(AppleAssembliesToBundle._IsNative)' == 'true'"
Include="@(AppleAssembliesToBundle)" TargetDir="extraFiles" />
Include="@(AppleAssembliesToBundle)" TargetDir="extraFiles\%(AppleAssembliesToBundle.RecursiveDir)" />
</ItemGroup>

<ItemGroup Condition="'$(DebuggerSupport)' == 'true'">
Expand Down
1 change: 1 addition & 0 deletions src/tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@

<Target Name="BuildMonoiOSApp">
<PropertyGroup>
<IntermediateOutputPath>$([System.IO.Path]::GetFullPath('$(IntermediateOutputPath)'))</IntermediateOutputPath>
<CMDDIR_Grandparent>$([System.IO.Path]::GetDirectoryName($([System.IO.Path]::GetDirectoryName($(_CMDDIR)))))</CMDDIR_Grandparent>
<CategoryWithSlash>$([System.String]::Copy('$(_CMDDIR)').Replace("$(CMDDIR_Grandparent)/",""))</CategoryWithSlash>
<Category>$([System.String]::Copy('$(CategoryWithSlash)').Replace('/','_'))</Category>
Expand Down