Skip to content

Commit

Permalink
Merge pull request #4751 from dnnsoftware/release/9.10.0
Browse files Browse the repository at this point in the history
Merging Release/9.10.0 into master to release v9.10.0
  • Loading branch information
valadas authored Jul 21, 2021
2 parents 05d6a7e + 680e6c3 commit 746498b
Show file tree
Hide file tree
Showing 318 changed files with 44,596 additions and 10,902 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,22 @@ updates:
directory: "/"
schedule:
interval: "daily"
labels:
- "Type: Build/Release"
- "Type: Maintenance"

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "monthly"
labels:
- "javascript"
- "Type: Maintenance"

- package-ecosystem: "nuget"
directory: "/"
schedule:
interval: "monthly"
labels:
- ".NET"
- "Type: Maintenance"
4 changes: 2 additions & 2 deletions .github/workflows/image-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
uses: actions/checkout@v2.3.4

- name: Compress Images
id: compress_images
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Create Pull Request
if: | # If it's not a Pull Request then commit any changes as a new PR.
github.event_name != 'pull_request' && steps.compress_images.outputs.markdown != ''
uses: peter-evans/create-pull-request@v3
uses: peter-evans/create-pull-request@v3.10.0
with:
title: Auto Compress Images
branch-suffix: timestamp
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/updateVersions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.ref_type == 'branch' && startsWith(github.event.ref, 'release/') }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v2.3.4

- name: Get the release branch version
uses: valadas/get-release-branch-version@v1
uses: valadas/get-release-branch-version@v1.0.1
id: branchVersion

- name: Set versions
uses: valadas/set-dnn-manifest-versions@v1
uses: valadas/set-dnn-manifest-versions@v1.2.0
with:
version: ${{ steps.branchVersion.outputs.manifestSafeVersionString }}
skipFile: './Build/Cake/unversionedManifests.txt'
Expand All @@ -23,7 +23,7 @@ jobs:
includePackageJson: true
includeDnnReactCommon: true
- name: Create Pull Request
uses: peter-evans/create-pull-request@v2.7.1
uses: peter-evans/create-pull-request@v3.10.0
with:
commit-message: Updates versions as per release candidate creation
title: Updates versions as per release candidate creation
Expand Down
2 changes: 1 addition & 1 deletion Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<PackageReference Include="Cake.Issues" Version="0.9.1" />
<PackageReference Include="Cake.Issues.MsBuild" Version="0.9.1" />
<PackageReference Include="Cake.Issues.Recipe" Version="0.4.4" />
<PackageReference Include="Cake.Json" Version="6.0.0" />
<PackageReference Include="Cake.Json" Version="6.0.1" />
<PackageReference Include="Cake.XdtTransform" Version="1.0.0" />
<PackageReference Include="Dnn.CakeUtils" Version="2.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
Expand Down
2 changes: 1 addition & 1 deletion Build/Symbols/DotNetNuke_Symbols.dnn
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="DotNetNuke_Symbols" type="Library" version="09.09.00" >
<package name="DotNetNuke_Symbols" type="Library" version="09.09.01" >
<friendlyName>DNN Platform Symbols</friendlyName>
<description>This package contains Debug Symbols and Intellisense files for DNN Platform.</description>
<owner>
Expand Down
18 changes: 13 additions & 5 deletions Build/Tasks/CreateNugetPackages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace DotNetNuke.Build.Tasks
using Cake.Common.IO;
using Cake.Common.Tools.NuGet;
using Cake.Common.Tools.NuGet.Pack;
using Cake.Core;
using Cake.Frosting;

using DotNetNuke.Build;

/// <summary>A cake task to create the platform's NuGet packages.</summary>
Expand All @@ -24,6 +24,7 @@ public override void Run(Context context)
{
// look for solutions and start building them
var nuspecFiles = context.GetFiles("./Build/Tools/NuGet/*.nuspec");
var noSymbolsNuspecFiles = context.GetFiles("./Build/Tools/NuGet/DotNetNuke.WebApi.nuspec");

context.Information("Found {0} nuspec files.", nuspecFiles.Count);

Expand All @@ -35,15 +36,22 @@ public override void Run(Context context)
IncludeReferencedProjects = true,
Symbols = true,
Properties = new Dictionary<string, string> { { "Configuration", "Release" } },
ArgumentCustomization = args => args.Append("-SymbolPackageFormat snupkg"),
};

// loop through each nuspec file and create the package
nuspecFiles -= noSymbolsNuspecFiles;
foreach (var spec in nuspecFiles)
{
var specPath = spec.ToString();
context.Information("Starting to pack: {0}", spec);
context.NuGetPack(spec.FullPath, nuGetPackSettings);
}

context.Information("Starting to pack: {0}", specPath);
context.NuGetPack(specPath, nuGetPackSettings);
nuGetPackSettings.Symbols = false;
nuGetPackSettings.ArgumentCustomization = null;
foreach (var spec in noSymbolsNuspecFiles)
{
context.Information("Starting to pack: {0}", spec);
context.NuGetPack(spec.FullPath, nuGetPackSettings);
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions Build/Tasks/OtherPackages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ namespace DotNetNuke.Build.Tasks
/// <summary>A cake task to include other 3rd party packages.</summary>
[Dependency(typeof(PackageNewtonsoft))]
[Dependency(typeof(PackageMailKit))]
[Dependency(typeof(PackageAspNetWebApi))]
[Dependency(typeof(PackageAspNetWebPages))]
[Dependency(typeof(PackageAspNetMvc))]
public sealed class OtherPackages : FrostingTask<Context>
{
/// <inheritdoc/>
Expand Down
69 changes: 69 additions & 0 deletions Build/Tasks/PackageAspNetMvc.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Build.Tasks
{
using System;
using System.Diagnostics;
using System.Linq;
using System.Xml;

using Cake.Common.Diagnostics;
using Cake.Common.IO;
using Cake.Frosting;
using Dnn.CakeUtils;

/// <summary>A cake task to generate the ASP.NET MVC package.</summary>
public sealed class PackageAspNetMvc : FrostingTask<Context>
{
/// <inheritdoc/>
public override void Run(Context context)
{
var binDir = context.WebsiteDir.Path.Combine("bin");
var mainAssemblyPath = binDir.CombineWithFilePath("System.Web.Mvc.dll");
var packageVersion = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(mainAssemblyPath).FullPath).FileVersion;

var packageZip = context.WebsiteDir.Path.CombineWithFilePath($"Install/Library/AspNetMvc_{packageVersion}_Install.zip");
var packageDir = context.Directory("DNN Platform/Components/Microsoft.AspNetMvc");

context.Information($"Creating {packageZip}");
context.Zip(
packageDir.ToString(),
packageZip,
context.GetFilesByPatterns(packageDir, new[] { "*" }, new[] { "*.dnn" }));

var manifestPath = context.GetFiles(packageDir.Path.CombineWithFilePath("*.dnn").ToString()).Single();
context.Information($"Reading manifest from {manifestPath}");
var manifest = new XmlDocument();
manifest.LoadXml(context.ReadFile(manifestPath));
var assemblies =
from XmlNode assemblyNode in manifest.SelectNodes("//assembly")
from XmlNode childNode in assemblyNode.ChildNodes
where childNode.LocalName.Equals("name")
select childNode;

foreach (var assemblyNameNode in assemblies)
{
var assemblyPath = binDir.CombineWithFilePath(assemblyNameNode.InnerText);
context.Information($"Adding {assemblyPath} to {packageZip}");
context.AddFilesToZip(
packageZip,
context.MakeAbsolute(context.WebsiteDir.Path),
context.GetFiles(assemblyPath.ToString()),
append: true);

var versionNode = assemblyNameNode.ParentNode.ChildNodes.Cast<XmlNode>()
.SingleOrDefault(childNode => childNode.LocalName.Equals("version"));
if (versionNode != null)
{
versionNode.InnerText = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(assemblyPath).FullPath).FileVersion;
context.Information($"Set {assemblyPath} version to {versionNode.InnerText}");
}
}

manifest.SelectSingleNode("//package[@version]").Attributes["version"].Value = packageVersion;

context.AddXmlFileToZip(packageZip, manifest, manifestPath.GetFilename().ToString(), append: true);
}
}
}
69 changes: 69 additions & 0 deletions Build/Tasks/PackageAspNetWebApi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Build.Tasks
{
using System;
using System.Diagnostics;
using System.Linq;
using System.Xml;

using Cake.Common.Diagnostics;
using Cake.Common.IO;
using Cake.Frosting;
using Dnn.CakeUtils;

/// <summary>A cake task to generate the ASP.NET Web API package.</summary>
public sealed class PackageAspNetWebApi : FrostingTask<Context>
{
/// <inheritdoc/>
public override void Run(Context context)
{
var binDir = context.WebsiteDir.Path.Combine("bin");
var mainAssemblyPath = binDir.CombineWithFilePath("System.Web.Http.dll");
var packageVersion = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(mainAssemblyPath).FullPath).FileVersion;

var packageZip = context.WebsiteDir.Path.CombineWithFilePath($"Install/Library/AspNetWebApi_{packageVersion}_Install.zip");
var packageDir = context.Directory("DNN Platform/Components/Microsoft.AspNetWebApi");

context.Information($"Creating {packageZip}");
context.Zip(
packageDir.ToString(),
packageZip,
context.GetFilesByPatterns(packageDir, new[] { "*" }, new[] { "*.dnn" }));

var manifestPath = context.GetFiles(packageDir.Path.CombineWithFilePath("*.dnn").ToString()).Single();
context.Information($"Reading manifest from {manifestPath}");
var manifest = new XmlDocument();
manifest.LoadXml(context.ReadFile(manifestPath));
var assemblies =
from XmlNode assemblyNode in manifest.SelectNodes("//assembly")
from XmlNode childNode in assemblyNode.ChildNodes
where childNode.LocalName.Equals("name")
select childNode;

foreach (var assemblyNameNode in assemblies)
{
var assemblyPath = binDir.CombineWithFilePath(assemblyNameNode.InnerText);
context.Information($"Adding {assemblyPath} to {packageZip}");
context.AddFilesToZip(
packageZip,
context.MakeAbsolute(context.WebsiteDir.Path),
context.GetFiles(assemblyPath.ToString()),
append: true);

var versionNode = assemblyNameNode.ParentNode.ChildNodes.Cast<XmlNode>()
.SingleOrDefault(childNode => childNode.LocalName.Equals("version"));
if (versionNode != null)
{
versionNode.InnerText = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(assemblyPath).FullPath).FileVersion;
context.Information($"Set {assemblyPath} version to {versionNode.InnerText}");
}
}

manifest.SelectSingleNode("//package[@version]").Attributes["version"].Value = packageVersion;

context.AddXmlFileToZip(packageZip, manifest, manifestPath.GetFilename().ToString(), append: true);
}
}
}
69 changes: 69 additions & 0 deletions Build/Tasks/PackageAspNetWebPages.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Build.Tasks
{
using System;
using System.Diagnostics;
using System.Linq;
using System.Xml;

using Cake.Common.Diagnostics;
using Cake.Common.IO;
using Cake.Frosting;
using Dnn.CakeUtils;

/// <summary>A cake task to generate the ASP.NET Web Pages package.</summary>
public sealed class PackageAspNetWebPages : FrostingTask<Context>
{
/// <inheritdoc/>
public override void Run(Context context)
{
var binDir = context.WebsiteDir.Path.Combine("bin");
var mainAssemblyPath = binDir.CombineWithFilePath("System.Web.WebPages.dll");
var packageVersion = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(mainAssemblyPath).FullPath).FileVersion;

var packageZip = context.WebsiteDir.Path.CombineWithFilePath($"Install/Library/AspNetWebPages_{packageVersion}_Install.zip");
var packageDir = context.Directory("DNN Platform/Components/Microsoft.AspNetWebPages");

context.Information($"Creating {packageZip}");
context.Zip(
packageDir.ToString(),
packageZip,
context.GetFilesByPatterns(packageDir, new[] { "*" }, new[] { "*.dnn" }));

var manifestPath = context.GetFiles(packageDir.Path.CombineWithFilePath("*.dnn").ToString()).Single();
context.Information($"Reading manifest from {manifestPath}");
var manifest = new XmlDocument();
manifest.LoadXml(context.ReadFile(manifestPath));
var assemblies =
from XmlNode assemblyNode in manifest.SelectNodes("//assembly")
from XmlNode childNode in assemblyNode.ChildNodes
where childNode.LocalName.Equals("name")
select childNode;

foreach (var assemblyNameNode in assemblies)
{
var assemblyPath = binDir.CombineWithFilePath(assemblyNameNode.InnerText);
context.Information($"Adding {assemblyPath} to {packageZip}");
context.AddFilesToZip(
packageZip,
context.MakeAbsolute(context.WebsiteDir.Path),
context.GetFiles(assemblyPath.ToString()),
append: true);

var versionNode = assemblyNameNode.ParentNode.ChildNodes.Cast<XmlNode>()
.SingleOrDefault(childNode => childNode.LocalName.Equals("version"));
if (versionNode != null)
{
versionNode.InnerText = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(assemblyPath).FullPath).FileVersion;
context.Information($"Set {assemblyPath} version to {versionNode.InnerText}");
}
}

manifest.SelectSingleNode("//package[@version]").Attributes["version"].Value = packageVersion;

context.AddXmlFileToZip(packageZip, manifest, manifestPath.GetFilename().ToString(), append: true);
}
}
}
Loading

0 comments on commit 746498b

Please sign in to comment.