-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4751 from dnnsoftware/release/9.10.0
Merging Release/9.10.0 into master to release v9.10.0
- Loading branch information
Showing
318 changed files
with
44,596 additions
and
10,902 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} | ||
} |
Oops, something went wrong.