|
6 | 6 | <UmbracoWwwrootName Condition="'$(UmbracoWwwrootName)' == ''">umbraco</UmbracoWwwrootName>
|
7 | 7 | </PropertyGroup>
|
8 | 8 |
|
| 9 | + <PropertyGroup> |
| 10 | + <DefaultItemExcludes>$(DefaultItemExcludes);App_Plugins\**;</DefaultItemExcludes> |
| 11 | + |
| 12 | + <DefaultItemExcludes>$(DefaultItemExcludes);umbraco\Data\**;</DefaultItemExcludes> |
| 13 | + <DefaultItemExcludes>$(DefaultItemExcludes);umbraco\Logs\**;</DefaultItemExcludes> |
| 14 | + <DefaultItemExcludes>$(DefaultItemExcludes);umbraco\mediacache\**;</DefaultItemExcludes> |
| 15 | + |
| 16 | + <DefaultItemExcludes>$(DefaultItemExcludes);wwwroot\media\**;</DefaultItemExcludes> |
| 17 | + </PropertyGroup> |
| 18 | + |
9 | 19 | <Target Name="CopyUmbracoAssets" BeforeTargets="BeforeBuild">
|
10 | 20 | <ItemGroup>
|
11 | 21 | <ContentFiles Include="$(ContentFilesPath)" />
|
|
21 | 31 | SourceFiles="@(ContentWwwrootFiles)"
|
22 | 32 | DestinationFiles="@(ContentWwwrootFiles->'$(MSBuildProjectDirectory)\wwwroot\$(UmbracoWwwrootName)\%(RecursiveDir)%(Filename)%(Extension)')"
|
23 | 33 | SkipUnchangedFiles="true" />
|
| 34 | + </Target> |
| 35 | + |
| 36 | + <Target Name="IncludeAppPluginsContent" BeforeTargets="GetCopyToOutputDirectoryItems"> |
| 37 | + <ItemGroup> |
| 38 | + <_AppPluginsFiles Include="App_Plugins\**" /> |
24 | 39 |
|
| 40 | + <ContentWithTargetPath |
| 41 | + Include="@(_AppPluginsFiles)" |
| 42 | + TargetPath="%(Identity)" |
| 43 | + CopyToOutputDirectory="Always" /> |
| 44 | + </ItemGroup> |
| 45 | + </Target> |
| 46 | + |
| 47 | + <!-- |
| 48 | + The set of files to publish is generated really early and doesn't currently account for files added by targets e.g. BeforeBuild. |
| 49 | + A fix was put in place in Web SDK to update for wwwwroot in case someone runs npm build etc in a target, we're borrowing their trick. |
| 50 | + https://github.com/dotnet/sdk/blob/e2b2b1a4ac56c955b84d62fe71cda3b6f258b42b/src/WebSdk/Publish/Targets/ComputeTargets/Microsoft.NET.Sdk.Publish.ComputeFiles.targets |
| 51 | + --> |
| 52 | + <Target Name="IncludeUmbracoFolderContent" BeforeTargets="GetCopyToOutputDirectoryItems"> |
| 53 | + <ItemGroup> |
| 54 | + <_UmbracoFolderFiles Include="umbraco\config\**" /> |
| 55 | + <_UmbracoFolderFiles Include="umbraco\PartialViewMacros\**" /> |
| 56 | + <_UmbracoFolderFiles Include="umbraco\UmbracoBackOffice\**" /> |
| 57 | + <_UmbracoFolderFiles Include="umbraco\UmbracoInstall\**" /> |
| 58 | + <_UmbracoFolderFiles Include="umbraco\UmbracoWebsite\**" /> |
| 59 | + <_UmbracoFolderFiles Include="umbraco\UmbracoWebsite\**" /> |
| 60 | + <_UmbracoFolderFiles Include="umbraco\Licenses\**" /> |
| 61 | + |
| 62 | + <!-- This could be handled in deploy if it's not already --> |
| 63 | + <_UmbracoFolderFiles Include="umbraco\Deploy\**" /> |
| 64 | + |
| 65 | + <ContentWithTargetPath |
| 66 | + Include="@(_UmbracoFolderFiles)" |
| 67 | + TargetPath="%(Identity)" |
| 68 | + CopyToOutputDirectory="Always" /> |
| 69 | + </ItemGroup> |
25 | 70 | </Target>
|
26 | 71 |
|
27 | 72 | <Target Name="ClearUmbracoAssets" BeforeTargets="Clean">
|
|
0 commit comments