Skip to content

Commit

Permalink
[WIP] Support for Umbraco v10, .NET 6.0
Browse files Browse the repository at this point in the history
- Compiles against Umbraco v10-rc1
- Upgraded to Visual Studio 2022
- Upgraded v8 and v9 demo sites to latest major version
- Installed uSync preview (for Umbraco v10)
  • Loading branch information
leekelleher committed May 5, 2022
1 parent 560ddd1 commit 6cc579e
Show file tree
Hide file tree
Showing 261 changed files with 10,300 additions and 93 deletions.
9 changes: 5 additions & 4 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,12 @@ Downloads are available on the [releases page](https://github.com/leekelleher/um

_**Please note...**_

- v3.x has been developed against **Umbraco v8.17.0** and **Umbraco v9.0.0** and will support those versions and above.
- v2.x has been developed against **Umbraco v8.14.0** and it will still work on current Umbraco v8.x releases.
- v1.x has been developed against **Umbraco v8.6.1**, it will still work on current Umbraco v8.x releases.
- v4.x has been developed against **Umbraco v8.18.0**, **Umbraco v9.4.0** and **Umbraco v10.0.0**, it will support those versions and above.
- v3.x has been developed against **Umbraco v8.17.0** and **Umbraco v9.0.0**, it will work on latest Umbraco v8.x and v9.x releases.
- v2.x has been developed against **Umbraco v8.14.0**, it will still work on latest Umbraco v8.x releases.
- v1.x has been developed against **Umbraco v8.6.1**, it will still work on latest Umbraco v8.x releases.

With Contentment v3.x on Umbraco v9.0 (.NET 5), you can only install a package from the [NuGet package repository](https://www.nuget.org/packages/Our.Umbraco.Community.Contentment). For Umbraco v8.x, the package can still be installed from either [Our Umbraco](https://our.umbraco.com/packages/backoffice-extensions/contentment/) or NuGet package repositories.
With Contentment v3+ on Umbraco v9+ (.NET 5+), you can only install a package from the [NuGet package repository](https://www.nuget.org/packages/Our.Umbraco.Community.Contentment). For Umbraco v8.x, the package can still be installed from either [Our Umbraco](https://our.umbraco.com/packages/backoffice-extensions/contentment/) or NuGet package repositories.

##### NuGet package repository

Expand Down
8 changes: 4 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ build/build-push-nuget.ps1
build/build-push-umb.ps1
src/packages/*/**
src/Umbraco.Cms.8.x/App_Data/*
src/Umbraco.Cms.[89].x/App_Plugins/*/**
src/Umbraco.Cms.*.x/App_Plugins/*/**
src/Umbraco.Cms.8.x/Umbraco/*
src/Umbraco.Cms.[89].x/Views/Partials/[Bb]lock[Ll]ist/*
src/Umbraco.Cms.[89].x/Views/Partials/[Gg]rid/*
src/Umbraco.Cms.10.x/*/**
src/Umbraco.Cms.10.x/Umbraco/Data/*
src/Umbraco.Cms.*.x/Views/Partials/[Bb]lock[Ll]ist/*
src/Umbraco.Cms.*.x/Views/Partials/[Gg]rid/*
tools/*.exe
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.0-develop
4.0.0-alpha001
4 changes: 2 additions & 2 deletions build/build-assets.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,9 @@ foreach($razorFile in $razorFiles){
# CSS - Bundle & Minify
$targetCssPath = "${pluginFolder}contentment.css";
Get-Content -Raw -Path "${ProjectDir}**\**\*.css" | Set-Content -Encoding UTF8 -Path $targetCssPath;
& "${rootDir}\tools\AjaxMinifier.exe" $targetCssPath -o $targetCssPath
#& "${rootDir}\tools\AjaxMinifier.exe" $targetCssPath -o $targetCssPath

# JS - Bundle & Minify
$targetJsPath = "${pluginFolder}contentment.js";
Get-Content -Raw -Path "${ProjectDir}**\**\*.js" | Set-Content -Encoding UTF8 -Path $targetJsPath;
& "${rootDir}\tools\AjaxMinifier.exe" $targetJsPath -o $targetJsPath
#& "${rootDir}\tools\AjaxMinifier.exe" $targetJsPath -o $targetJsPath
14 changes: 8 additions & 6 deletions build/build-pkgs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $licenseName = 'Mozilla Public License Version 2.0';
$licenseUrl = 'https://mozilla.org/MPL/2.0/';
$authorName = 'Lee Kelleher';
$authorUrl = 'https://leekelleher.com/';
$minUmbracoVersion = 8,17,0;
$minUmbracoVersion = 8,18,0;
$copyright = "Copyright " + [char]0x00A9 + " " + (Get-Date).year + " $authorName";
$tags = "umbraco";

Expand Down Expand Up @@ -53,7 +53,7 @@ Write-Host 'Restoring NuGet packages...';
& $nuget_exe restore "${srcFolder}\${projectNamespace}.sln";

Write-Host 'Compiling Visual Studio solution.';
& $msbuild_exe "${srcFolder}\${projectNamespace}.sln" /p:Configuration=Release
& $msbuild_exe "${srcFolder}\${projectNamespace}\${projectNamespace}.csproj" /p:Configuration=Release
if (-NOT $?) {
throw 'The MSBuild process returned an error code.';
}
Expand All @@ -63,10 +63,12 @@ if (-NOT $?) {
$net472Folder = "${assetsFolder}\bin";
if (!(Test-Path -Path $net472Folder)) {New-Item -Path $net472Folder -Type Directory;}
Copy-Item -Path "${srcFolder}\${projectNamespace}\bin\Release\net472\${projectNamespace}.*" -Destination $net472Folder;
$net50Folder = "${assetsFolder}\net50";
$net50Folder = "${assetsFolder}\net5.0";
if (!(Test-Path -Path $net50Folder)) {New-Item -Path $net50Folder -Type Directory;}
Copy-Item -Path "${srcFolder}\${projectNamespace}\bin\Release\net50\${projectNamespace}.*" -Destination $net50Folder;

Copy-Item -Path "${srcFolder}\${projectNamespace}\bin\Release\net5.0\${projectNamespace}.*" -Destination $net50Folder;
$net60Folder = "${assetsFolder}\net6.0";
if (!(Test-Path -Path $net60Folder)) {New-Item -Path $net60Folder -Type Directory;}
Copy-Item -Path "${srcFolder}\${projectNamespace}\bin\Release\net6.0\${projectNamespace}.*" -Destination $net60Folder;

# Populate the Umbraco package manifest

Expand All @@ -90,7 +92,7 @@ $umbracoPackageXml.umbPackage.info.readme."#cdata-section" = $packageDescription

$filesXml = $umbracoPackageXml.CreateElement("files");

$assetFiles = Get-ChildItem -Path $assetsFolder -File -Recurse | Where { $_.FullName -NotLike "*\net50\*" };
$assetFiles = Get-ChildItem -Path $assetsFolder -File -Recurse | Where { $_.FullName -NotLike "*\net*\*" };
foreach($assetFile in $assetFiles){

$hash = Get-FileHash -Path $assetFile.FullName -Algorithm MD5;
Expand Down
15 changes: 10 additions & 5 deletions build/manifest-nuget-core.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,22 @@
<repository type="git" url="$repositoryUrl$" />
<dependencies>
<group targetFramework="net472">
<dependency id="UmbracoCms.Web" version="[8.17.0, 9.0.0)" />
<dependency id="UmbracoCms.Web" version="[8.18.0, 9.0.0)" />
</group>
<group targetFramework="net50">
<dependency id="Umbraco.Cms.Web.Website" version="[9.0.0, 10.0.0)" />
<dependency id="Umbraco.Cms.Web.BackOffice" version="[9.0.0, 10.0.0)" />
<group targetFramework="net5.0">
<dependency id="Umbraco.Cms.Web.Website" version="[9.4.0, 10.0.0)" />
<dependency id="Umbraco.Cms.Web.BackOffice" version="[9.4.0, 10.0.0)" />
</group>
<group targetFramework="net6.0">
<dependency id="Umbraco.Cms.Web.Website" version="[10.0.0, 11.0.0)" />
<dependency id="Umbraco.Cms.Web.BackOffice" version="[10.0.0, 11.0.0)" />
</group>
</dependencies>
</metadata>
<files>
<file src="bin\*.dll" target="lib\net472" />
<file src="net50\*.dll" target="lib\net5.0" />
<file src="net5.0\*.dll" target="lib\net5.0" />
<file src="net6.0\*.dll" target="lib\net6.0" />
<file src="icon.png" target="" />
<file src="README.md" target="" />
</files>
Expand Down
9 changes: 9 additions & 0 deletions src/NuGet.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="Umbraco Prereleases" value="https://www.myget.org/F/umbracoprereleases/api/v3/index.json" />
<add key="Umbraco Nightly" value="https://www.myget.org/F/umbraconightly/api/v3/index.json" />
<add key="uSync Nightly" value="https://pkgs.dev.azure.com/jumoo/Public/_packaging/nightly/nuget/v3/index.json" />
</packageSources>
</configuration>
Loading

0 comments on commit 6cc579e

Please sign in to comment.