move static assets and the target+props file to a seperate nuget. Now the root package is only referencing other packages

This commit is contained in:
Bjarke Berg
2021-03-19 08:08:00 +01:00
parent bfb78e937f
commit f668bf060a
6 changed files with 44 additions and 13 deletions

View 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>

View File

@@ -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>

View File

@@ -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)')"

View File

@@ -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())" `

View File

@@ -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}"