Merge pull request #10012 from umbraco/netcore/feature/seperate-nuget-for-static-assets
Netcore: Separate NuGet package for the static assets
This commit is contained in:
33
build/NuSpecs/UmbracoCms.StaticAssets.nuspec
Normal file
33
build/NuSpecs/UmbracoCms.StaticAssets.nuspec
Normal file
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata minClientVersion="4.1.0">
|
||||
<id>Umbraco.Cms.StaticAssets</id>
|
||||
<version>9.0.0</version>
|
||||
<title>Umbraco Cms Static Assets</title>
|
||||
<authors>Umbraco HQ</authors>
|
||||
<owners>Umbraco HQ</owners>
|
||||
<license type="expression">MIT</license>
|
||||
<projectUrl>https://umbraco.com/</projectUrl>
|
||||
<iconUrl>https://umbraco.com/dist/nuget/logo-small.png</iconUrl>
|
||||
<requireLicenseAcceptance>false</requireLicenseAcceptance>
|
||||
<description>Contains the static assets that is required to run Umbraco CMS.</description>
|
||||
<summary>Contains the static assets that is required to run Umbraco CMS.</summary>
|
||||
<language>en-US</language>
|
||||
<tags>umbraco</tags>
|
||||
<repository type="git" url="https://github.com/umbraco/umbraco-cms" />
|
||||
<dependencies>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<!-- Content -->
|
||||
<file src="$BuildTmp$\WebApp\wwwroot\umbraco\**\*.*" target="content\wwwroot\umbraco" />
|
||||
<file src="$BuildTmp$\WebApp\umbraco\**\*.*" target="content\umbraco" />
|
||||
|
||||
<!-- Readme -->
|
||||
<file src="tools\Readme.txt" target="Readme.txt" />
|
||||
<file src="tools\ReadmeUpgrade.txt" target="ReadmeUpgrade.txt" />
|
||||
|
||||
<!-- UmbracoCms props and targets used to copy the content into the solution -->
|
||||
<file src="build\**" target="build\" />
|
||||
</files>
|
||||
</package>
|
||||
@@ -19,6 +19,7 @@
|
||||
<group targetFramework="net5.0">
|
||||
<dependency id="Umbraco.Cms.Web.Website" version="[$version$]" />
|
||||
<dependency id="Umbraco.Cms.Web.BackOffice" version="[$version$]" />
|
||||
<dependency id="Umbraco.Cms.StaticAssets" version="[$version$]" />
|
||||
</group>
|
||||
</dependencies>
|
||||
<!--
|
||||
@@ -28,15 +29,5 @@
|
||||
<contentFiles />
|
||||
</metadata>
|
||||
<files>
|
||||
<!-- Content -->
|
||||
<file src="$BuildTmp$\WebApp\wwwroot\umbraco\**\*.*" target="content\wwwroot\umbraco" />
|
||||
<file src="$BuildTmp$\WebApp\umbraco\**\*.*" target="content\umbraco" />
|
||||
|
||||
<!-- Readme -->
|
||||
<file src="tools\Readme.txt" target="Readme.txt" />
|
||||
<file src="tools\ReadmeUpgrade.txt" target="ReadmeUpgrade.txt" />
|
||||
|
||||
<!-- UmbracoCms props and targets used to copy the content into the solution -->
|
||||
<file src="build\**" target="build\" />
|
||||
</files>
|
||||
</package>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
<ContentFiles Include="$(ContentFilesPath)" />
|
||||
</ItemGroup>
|
||||
<Message Text="Copying content files: $(ContentFilesPath) - #@(ContentFiles->Count()) files" Importance="high" />
|
||||
<Message Text="Copying Umbraco content files: $(ContentFilesPath) - #@(ContentFiles->Count()) files" Importance="high" />
|
||||
<Copy
|
||||
SourceFiles="@(ContentFiles)"
|
||||
DestinationFiles="@(ContentFiles->'$(MSBuildProjectDirectory)\%(RecursiveDir)%(Filename)%(Extension)')"
|
||||
@@ -448,6 +448,12 @@
|
||||
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmssqlce.log"
|
||||
if (-not $?) { throw "Failed to pack NuGet UmbracoCms.SqlCe." }
|
||||
|
||||
&$this.BuildEnv.NuGet Pack "$nuspecs\UmbracoCms.StaticAssets.nuspec" `
|
||||
-Properties BuildTmp="$($this.BuildTemp)" `
|
||||
-Version "$($this.Version.Semver.ToString())" `
|
||||
-Verbosity detailed -outputDirectory "$($this.BuildOutput)" > "$($this.BuildTemp)\nupack.cmsstaticassets.log"
|
||||
if (-not $?) { throw "Failed to pack NuGet UmbracoCms.StaticAssets." }
|
||||
|
||||
&$this.BuildEnv.NuGet Pack "$templates\Umbraco.Templates.nuspec" `
|
||||
-Properties BuildTmp="$($this.BuildTemp)" `
|
||||
-Version "$($this.Version.Semver.ToString())" `
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
using Umbraco.Cms.Core.Runtime;
|
||||
|
||||
namespace Umbraco.Cms.Infrastructure.Search
|
||||
{
|
||||
/// <summary>
|
||||
/// Executes after all other examine components have executed
|
||||
/// </summary>
|
||||
public sealed class ExamineFinalComponent : IComponent
|
||||
{
|
||||
BackgroundIndexRebuilder _indexRebuilder;
|
||||
private readonly IMainDom _mainDom;
|
||||
|
||||
public ExamineFinalComponent(BackgroundIndexRebuilder indexRebuilder, IMainDom mainDom)
|
||||
{
|
||||
_indexRebuilder = indexRebuilder;
|
||||
_mainDom = mainDom;
|
||||
}
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
if (!_mainDom.IsMainDom) return;
|
||||
|
||||
// TODO: Instead of waiting 5000 ms, we could add an event handler on to fulfilling the first request, then start?
|
||||
_indexRebuilder.RebuildIndexes(true, TimeSpan.FromSeconds(5));
|
||||
}
|
||||
|
||||
public void Terminate()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using Umbraco.Cms.Core.Composing;
|
||||
|
||||
namespace Umbraco.Cms.Infrastructure.Search
|
||||
{
|
||||
// examine's final composer composes after all user composers
|
||||
// and *also* after ICoreComposer (in case IUserComposer is disabled)
|
||||
[ComposeAfter(typeof(IUserComposer))]
|
||||
[ComposeAfter(typeof(ICoreComposer))]
|
||||
public class ExamineFinalComposer : ComponentComposer<ExamineFinalComponent>
|
||||
{ }
|
||||
}
|
||||
@@ -35,6 +35,7 @@ namespace Umbraco.Cms.Infrastructure.Search
|
||||
private readonly IValueSetBuilder<IMember> _memberValueSetBuilder;
|
||||
private readonly BackgroundIndexRebuilder _backgroundIndexRebuilder;
|
||||
private readonly TaskHelper _taskHelper;
|
||||
private readonly IRuntimeState _runtimeState;
|
||||
private readonly IScopeProvider _scopeProvider;
|
||||
private readonly ServiceContext _services;
|
||||
private readonly IMainDom _mainDom;
|
||||
@@ -60,7 +61,8 @@ namespace Umbraco.Cms.Infrastructure.Search
|
||||
IValueSetBuilder<IMedia> mediaValueSetBuilder,
|
||||
IValueSetBuilder<IMember> memberValueSetBuilder,
|
||||
BackgroundIndexRebuilder backgroundIndexRebuilder,
|
||||
TaskHelper taskHelper)
|
||||
TaskHelper taskHelper,
|
||||
IRuntimeState runtimeState)
|
||||
{
|
||||
_services = services;
|
||||
_scopeProvider = scopeProvider;
|
||||
@@ -71,6 +73,7 @@ namespace Umbraco.Cms.Infrastructure.Search
|
||||
_memberValueSetBuilder = memberValueSetBuilder;
|
||||
_backgroundIndexRebuilder = backgroundIndexRebuilder;
|
||||
_taskHelper = taskHelper;
|
||||
_runtimeState = runtimeState;
|
||||
_mainDom = mainDom;
|
||||
_profilingLogger = profilingLogger;
|
||||
_logger = logger;
|
||||
@@ -114,7 +117,10 @@ namespace Umbraco.Cms.Infrastructure.Search
|
||||
s_deactivate_handlers = true;
|
||||
}
|
||||
|
||||
|
||||
if (_mainDom.IsMainDom && _runtimeState.Level >= RuntimeLevel.Run)
|
||||
{
|
||||
_backgroundIndexRebuilder.RebuildIndexes(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "NuSpecs", "NuSpecs", "{227C
|
||||
..\build\NuSpecs\UmbracoCms.nuspec = ..\build\NuSpecs\UmbracoCms.nuspec
|
||||
..\build\NuSpecs\UmbracoCms.SqlCe.nuspec = ..\build\NuSpecs\UmbracoCms.SqlCe.nuspec
|
||||
..\build\NuSpecs\UmbracoCms.Examine.Lucene.nuspec = ..\build\NuSpecs\UmbracoCms.Examine.Lucene.nuspec
|
||||
..\build\NuSpecs\UmbracoCms.StaticAssets.nuspec = ..\build\NuSpecs\UmbracoCms.StaticAssets.nuspec
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "Umbraco.Web.UI.Client", "http://localhost:3961", "{3819A550-DCEC-4153-91B4-8BA9F7F0B9B4}"
|
||||
@@ -113,8 +114,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tools", "tools", "{E3F9F378
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "build", "build", "{5B03EF4E-E0AC-4905-861B-8C3EC1A0D458}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
..\build\NuSpecs\build\Umbraco.Cms.props = ..\build\NuSpecs\build\Umbraco.Cms.props
|
||||
..\build\NuSpecs\build\Umbraco.Cms.targets = ..\build\NuSpecs\build\Umbraco.Cms.targets
|
||||
..\build\NuSpecs\build\Umbraco.Cms.StaticAssets.props = ..\build\NuSpecs\build\Umbraco.Cms.StaticAssets.props
|
||||
..\build\NuSpecs\build\Umbraco.Cms.StaticAssets.targets = ..\build\NuSpecs\build\Umbraco.Cms.StaticAssets.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DocTools", "DocTools", "{53594E5B-64A2-4545-8367-E3627D266AE8}"
|
||||
|
||||
Reference in New Issue
Block a user