* Update default UmbracoVersion template value using MSBuild target * Fix target order when using pack --no-build * Use JsonPathUpdateValue MSBuild task to update default UmbracoVersion template value * Update UmbracoVersion in Umbraco Package RCL
69 lines
3.3 KiB
XML
69 lines
3.3 KiB
XML
<Project Sdk="Microsoft.NET.Sdk">
|
|
<PropertyGroup>
|
|
<Title>Umbraco CMS - Templates</Title>
|
|
<Description>Coontains templates for Umbraco CMS.</Description>
|
|
<PackageType>Template</PackageType>
|
|
<IncludeBuildOutput>false</IncludeBuildOutput>
|
|
<IncludeSymbols>false</IncludeSymbols>
|
|
<NoDefaultExcludes>true</NoDefaultExcludes>
|
|
<IncludeContentInPack>true</IncludeContentInPack>
|
|
<ContentTargetFolders>.</ContentTargetFolders>
|
|
<NoWarn>NU5128</NoWarn>
|
|
</PropertyGroup>
|
|
|
|
<ItemGroup>
|
|
<Content Include="UmbracoPackage\**" Exclude="bin;obj" />
|
|
<Content Include="UmbracoPackageRcl\**" Exclude="bin;obj" />
|
|
<Content Include="UmbracoProject\**" Exclude="bin;obj" />
|
|
<Content Include="..\src\Umbraco.Web.UI\Program.cs">
|
|
<Link>UmbracoProject\Program.cs</Link>
|
|
<PackagePath>UmbracoProject</PackagePath>
|
|
</Content>
|
|
<Content Include="..\src\Umbraco.Web.UI\Startup.cs">
|
|
<Link>UmbracoProject\Startup.cs</Link>
|
|
<PackagePath>UmbracoProject</PackagePath>
|
|
</Content>
|
|
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\blocklist\**">
|
|
<Link>UmbracoProject\Views\Partials\blocklist\%(RecursiveDir)%(Filename)%(Extension)</Link>
|
|
<PackagePath>UmbracoProject\Views\Partials\blocklist</PackagePath>
|
|
</Content>
|
|
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\grid\**">
|
|
<Link>UmbracoProject\Views\Partials\grid\%(RecursiveDir)%(Filename)%(Extension)</Link>
|
|
<PackagePath>UmbracoProject\Views\Partials\grid</PackagePath>
|
|
</Content>
|
|
<Content Include="..\src\Umbraco.Web.UI\Views\Partials\blockgrid\**">
|
|
<Link>UmbracoProject\Views\Partials\blockgrid\%(RecursiveDir)%(Filename)%(Extension)</Link>
|
|
<PackagePath>UmbracoProject\Views\Partials\blockgrid</PackagePath>
|
|
</Content>
|
|
<Content Include="..\src\Umbraco.Web.UI\Views\_ViewImports.cshtml">
|
|
<Link>UmbracoProject\Views\_ViewImports.cshtml</Link>
|
|
<PackagePath>UmbracoProject\Views</PackagePath>
|
|
</Content>
|
|
<Content Include="..\src\Umbraco.Web.UI\wwwroot\favicon.ico">
|
|
<Link>UmbracoProject\wwwroot\favicon.ico</Link>
|
|
<PackagePath>UmbracoProject\wwwroot</PackagePath>
|
|
</Content>
|
|
</ItemGroup>
|
|
|
|
<!-- Update template.json files with the default UmbracoVersion value set to the current build version -->
|
|
<ItemGroup>
|
|
<PackageReference Include="Umbraco.JsonSchema.Extensions" Version="0.3.0" PrivateAssets="all" />
|
|
</ItemGroup>
|
|
<Target Name="GetUpdatedTemplateJsonPackageFiles" BeforeTargets="GenerateNuspec" AfterTargets="GetBuildVersion;GetUmbracoBuildVersion">
|
|
<ItemGroup>
|
|
<_TemplateJsonFiles Include="**\.template.config\template.json" Exclude="bin\**;obj\**" />
|
|
<_TemplateJsonFiles>
|
|
<DestinationFile>$(IntermediateOutputPath)%(RelativeDir)%(Filename)%(Extension)</DestinationFile>
|
|
</_TemplateJsonFiles>
|
|
</ItemGroup>
|
|
<Copy SourceFiles="@(_TemplateJsonFiles)" DestinationFiles="%(DestinationFile)" />
|
|
<JsonPathUpdateValue JsonFile="%(_TemplateJsonFiles.DestinationFile)" Path="$.symbols.UmbracoVersion.defaultValue" Value=""$(PackageVersion)"" />
|
|
<ItemGroup>
|
|
<_PackageFiles Remove="@(_TemplateJsonFiles)" />
|
|
<_PackageFiles Include="%(_TemplateJsonFiles.DestinationFile)">
|
|
<PackagePath>%(RelativeDir)</PackagePath>
|
|
</_PackageFiles>
|
|
</ItemGroup>
|
|
</Target>
|
|
</Project>
|