Skip to content

Commit

Permalink
Merge pull request #4883 from dnnsoftware/release/9.10.2
Browse files Browse the repository at this point in the history
Release/9.10.2
  • Loading branch information
valadas committed Oct 20, 2021
2 parents 7e293b9 + 3955e96 commit 4141ee8
Show file tree
Hide file tree
Showing 134 changed files with 2,784 additions and 1,443 deletions.
6 changes: 4 additions & 2 deletions .github/BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,11 @@ The build scripts should leave you with 0 tracked modified files in git.
If a build fails midway and you have tracked artifacts, you can simply run:
`git reset --hard` and/or `git clean -dxf` in order to come back to a clean state.

### Running Cake
### Troubleshooting

If you encounter PowerShell security issues, please read [Cake - PowerShell Security](https://cakebuild.net/docs/tutorials/powershell-security)
If you encounter PowerShell security issues, please read [Cake - PowerShell Security](https://cakebuild.net/docs/tutorials/powershell-security).

If you encouter Yarn issues, please [update Yarn to the lastest version](https://yarnpkg.com/getting-started/install).

### Git branching strategy

Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Provide any additional context that may be helpful in understanding and/or resol
Please add X in at least one of the boxes as appropriate. In order for an issue to be accepted, a developer needs to be able to reproduce the issue on a currently supported version. If you are looking for a workaround for an issue with an older version, please visit the forums at https://dnncommunity.org/forums
-->
* [ ] 10.00.00 alpha build
* [ ] 09.10.01 release candidate
* [ ] 09.10.00 latest supported release
* [ ] 09.10.02 release candidate
* [ ] 09.10.01 latest supported release

## Affected browser
<!--
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/image-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected].0
uses: peter-evans/[email protected].1
with:
title: Auto Compress Images
branch-suffix: timestamp
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/updateVersions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
includePackageJson: true
includeDnnReactCommon: true
- name: Create Pull Request
uses: peter-evans/[email protected].0
uses: peter-evans/[email protected].1
with:
commit-message: Updates versions as per release candidate creation
title: Updates versions as per release candidate creation
Expand Down
328 changes: 164 additions & 164 deletions .yarn/releases/yarn-3.0.0.cjs → .yarn/releases/yarn-3.0.2.cjs

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.0.0.cjs

yarnPath: .yarn/releases/yarn-3.0.2.cjs
18 changes: 9 additions & 9 deletions Build/Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@
<AdditionalFiles Include="..\stylecop.json" Link="stylecop.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Cake.BuildSystems.Module" Version="3.0.1" />
<PackageReference Include="Cake.FileHelpers" Version="4.0.0" />
<PackageReference Include="Cake.Frosting" Version="1.1.0" />
<PackageReference Include="Cake.Git" Version="1.0.1" />
<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.BuildSystems.Module" Version="3.0.3" />
<PackageReference Include="Cake.FileHelpers" Version="4.0.1" />
<PackageReference Include="Cake.Frosting" Version="1.2.0" />
<PackageReference Include="Cake.Frosting.Issues.Recipe" Version="1.3.1" />
<PackageReference Include="Cake.Git" Version="1.1.0" />
<PackageReference Include="Cake.Issues" Version="1.0.0" />
<PackageReference Include="Cake.Issues.MsBuild" Version="1.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" />
<PackageReference Include="Dnn.CakeUtils" Version="2.0.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down
6 changes: 3 additions & 3 deletions Build/Context.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ namespace DotNetNuke.Build
using Cake.Common.IO.Paths;
using Cake.Common.Tools.GitVersion;
using Cake.Core;
using Cake.Frosting;
using Cake.Frosting.Issues.Recipe;
using Cake.Json;

/// <inheritdoc/>
public class Context : FrostingContext
public class Context : IssuesContext
{
/// <summary>Initializes a new instance of the <see cref="Context"/> class.</summary>
/// <param name="context">The base context.</param>
public Context(ICakeContext context)
: base(context)
: base(context, RepositoryInfoProviderType.CakeGit)
{
try
{
Expand Down
19 changes: 14 additions & 5 deletions Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@
namespace DotNetNuke.Build
{
using System;
using System.Reflection;

using Cake.AzurePipelines.Module;
using Cake.Frosting;
using Cake.Frosting.Issues.Recipe;

/// <summary>Runs the build process.</summary>
public class Program
{
/// <summary>The version of the Microsoft.TestPlatform NuGet package.</summary>
internal const string MicrosoftTestPlatformVersion = "16.11.0";

/// <summary>The version of the NUnit3TestAdapter NuGet package.</summary>
internal const string NUnit3TestAdapterVersion = "4.0.0";

/// <summary>Runs the build process.</summary>
/// <param name="args">The arguments from the command line.</param>
/// <returns>A status code.</returns>
Expand All @@ -21,11 +29,12 @@ public static int Main(string[] args)
.UseLifetime<Lifetime>()
.UseWorkingDirectory("..")
.UseModule<AzurePipelinesModule>()
.InstallTool(new Uri("nuget:?package=GitVersion.CommandLine&version=5.0.1"))
.InstallTool(new Uri("nuget:?package=Microsoft.TestPlatform&version=16.8.0"))
.InstallTool(new Uri("nuget:?package=NUnit3TestAdapter&version=4.0.0"))
.InstallTool(new Uri("nuget:?package=NuGet.CommandLine&version=5.8.0"))
.InstallTool(new Uri("nuget:?package=Cake.Issues.MsBuild&version=0.9.1"))
.InstallTool(new Uri("dotnet:?package=GitVersion.Tool&version=5.7.0"))
.InstallTool(new Uri("nuget:?package=Microsoft.TestPlatform&version=" + MicrosoftTestPlatformVersion))
.InstallTool(new Uri("nuget:?package=NUnit3TestAdapter&version=" + NUnit3TestAdapterVersion))
.InstallTool(new Uri("nuget:?package=NuGet.CommandLine&version=5.10.0"))
.InstallTool(new Uri("nuget:?package=Cake.Issues.MsBuild&version=1.0.0"))
.AddAssembly(Assembly.GetAssembly(typeof(IssuesTask)))
.Run(args);
}
}
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.10.01" >
<package name="DotNetNuke_Symbols" type="Library" version="09.10.02" >
<friendlyName>DNN Platform Symbols</friendlyName>
<description>This package contains Debug Symbols and Intellisense files for DNN Platform.</description>
<owner>
Expand Down
39 changes: 4 additions & 35 deletions Build/Tasks/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,17 @@
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Build.Tasks
{
using System;
using System.Linq;

using Cake.Common.Build;
using Cake.Common.Build.AzurePipelines.Data;
using Cake.Common.Tools.MSBuild;
using Cake.Core.IO;
using Cake.Frosting;
using Cake.Issues;
using Cake.Issues.MsBuild;
using Cake.Frosting.Issues.Recipe;

using DotNetNuke.Build;

/// <summary>A cake task to compile the platform.</summary>
[Dependency(typeof(CleanWebsite))]
[Dependency(typeof(RestoreNuGetPackages))]
[IsDependeeOf(typeof(ReadIssuesTask))]
public sealed class Build : FrostingTask<Context>
{
/// <inheritdoc/>
Expand All @@ -41,7 +36,8 @@ public override void Run(Context context)
}
finally
{
ReportBuildIssues(context, cleanLog, buildLog);
context.Parameters.InputFiles.AddMsBuildBinaryLogFile(cleanLog);
context.Parameters.InputFiles.AddMsBuildBinaryLogFile(buildLog);
}
}

Expand All @@ -52,32 +48,5 @@ private static MSBuildSettings CreateMsBuildSettings(Context context, FilePath b
.WithLogger(context.Tools.Resolve("Cake.Issues.MsBuild*/**/StructuredLogger.dll").FullPath, "BinaryLogger", binLogPath.FullPath)
.SetNoConsoleLogger(context.IsRunningInCI);
}

private static void ReportBuildIssues(Context context, params FilePath[] logFilePaths)
{
if (!context.IsRunningInCI)
{
return;
}

// TODO: when Cake.Issues.Recipe is updated to support Frosting, we can switch to their more robust issue processing and reporting features
var issueProviders = logFilePaths.Select(logFilePath => context.MsBuildIssuesFromFilePath(logFilePath, context.MsBuildBinaryLogFileFormat()));
foreach (var issue in context.ReadIssues(issueProviders, context.Environment.WorkingDirectory))
{
var messageData = new AzurePipelinesMessageData
{
SourcePath = issue.AffectedFileRelativePath?.FullPath,
LineNumber = issue.Line,
};
if (issue.Priority == (int)IssuePriority.Error)
{
context.AzurePipelines().Commands.WriteError(issue.MessageText, messageData);
}
else
{
context.AzurePipelines().Commands.WriteWarning(issue.MessageText, messageData);
}
}
}
}
}
5 changes: 2 additions & 3 deletions Build/Tasks/BuildAll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Build.Tasks
{
using System;
using System.Linq;

using Cake.Frosting;
using Cake.Frosting.Issues.Recipe;

/// <summary>A cake task to compile the platform and create all of the packages.</summary>
/// <remarks>This is the task run during CI.</remarks>
Expand All @@ -20,6 +18,7 @@ namespace DotNetNuke.Build.Tasks
[Dependency(typeof(CreateSymbols))]
[Dependency(typeof(CreateNugetPackages))]
[Dependency(typeof(GeneratePackagesChecksums))]
[IsDependentOn(typeof(IssuesTask))]
public sealed class BuildAll : FrostingTask<Context>
{
/// <inheritdoc/>
Expand Down
4 changes: 2 additions & 2 deletions Build/Tasks/CreateNugetPackages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ public override void Run(Context context)
OutputDirectory = @"./Artifacts/",
IncludeReferencedProjects = true,
Symbols = true,
SymbolPackageFormat = "snupkg",
Properties = new Dictionary<string, string> { { "Configuration", "Release" } },
ArgumentCustomization = args => args.Append("-SymbolPackageFormat snupkg"),
};

nuspecFiles -= noSymbolsNuspecFiles;
Expand All @@ -47,7 +47,7 @@ public override void Run(Context context)
}

nuGetPackSettings.Symbols = false;
nuGetPackSettings.ArgumentCustomization = null;
nuGetPackSettings.SymbolPackageFormat = null;
foreach (var spec in noSymbolsNuspecFiles)
{
context.Information("Starting to pack: {0}", spec);
Expand Down
1 change: 1 addition & 0 deletions Build/Tasks/OtherPackages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ namespace DotNetNuke.Build.Tasks
[Dependency(typeof(PackageAspNetWebApi))]
[Dependency(typeof(PackageAspNetWebPages))]
[Dependency(typeof(PackageAspNetMvc))]
[Dependency(typeof(PackageMicrosoftGlobbing))]
public sealed class OtherPackages : FrostingTask<Context>
{
/// <inheritdoc/>
Expand Down
68 changes: 68 additions & 0 deletions Build/Tasks/PackageMicrosoftGlobbing.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// 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.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 Microsoft.Extensions.FileSystemGlobbing package.</summary>
public sealed class PackageMicrosoftGlobbing : FrostingTask<Context>
{
/// <inheritdoc/>
public override void Run(Context context)
{
var binDir = context.WebsiteDir.Path.Combine("bin");
var mainAssemblyPath = binDir.CombineWithFilePath("Microsoft.Extensions.FileSystemGlobbing.dll");
var packageVersion = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(mainAssemblyPath).FullPath).FileVersion;

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

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);
}
}
}
4 changes: 2 additions & 2 deletions Build/Tasks/UnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public override void Run(Context context)
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Integration.dll");
testAssemblies -= context.GetFiles(@"**\DotNetNuke.Tests.Urls.dll");

var vsTestPath = context.GetFiles("tools/Microsoft.TestPlatform.16.8.0/tools/**/vstest.console.exe")
var vsTestPath = context.GetFiles($"tools/Microsoft.TestPlatform.{Program.MicrosoftTestPlatformVersion}/tools/**/vstest.console.exe")
.First();
context.VSTest(
testAssemblies,
Expand All @@ -36,7 +36,7 @@ public override void Run(Context context)
Logger = "trx",
Parallel = true,
EnableCodeCoverage = true,
TestAdapterPath = @"tools\NUnit3TestAdapter.4.0.0\build",
TestAdapterPath = $@"tools\NUnit3TestAdapter.{Program.NUnit3TestAdapterVersion}\build",
});
}
}
Expand Down
3 changes: 2 additions & 1 deletion Build/Tasks/packaging.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
"/bin/Newtonsoft*",
"/bin/SchwabenCode*",
"/bin/System*",
"/bin/WebFormsMvp*"
"/bin/WebFormsMvp*",
"/bin/Microsoft.Extensions.FileSystemGlobbing*"
]
}
8 changes: 7 additions & 1 deletion Build/Tasks/thirdparty.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"name": "Telerik",
"folder": "DNN Platform/Components/Telerik/",
"destination": "Install/Module",
"excludes": ["**/*.xml"]
"excludes": [ "**/*.xml" ]
},
{
"name": "jQuery",
Expand Down Expand Up @@ -40,5 +40,11 @@
"folder": "DNN Platform/Components/Microsoft.CodeDom.Providers.DotNetCompilerPlatform/",
"destination": "Install/Library",
"extension": "resources"
},
{
"name": "MicrosoftFileSystemGlobbing",
"folder": "DNN Platform/Components/Microsoft.Extensions.FileSystemGlobbing/",
"destination": "Install/Library",
"excludes": [ "**/*.xml" ]
}
]
1 change: 1 addition & 0 deletions Build/Tools/NuGet/DotNetNuke.Web.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<copyright>Copyright (c) .NET Foundation and Contributors, All Rights Reserved.</copyright>
<dependencies>
<dependency id="DotNetNuke.Core" version="$version$" />
<dependency id="Microsoft.AspNet.WebApi.Core" version="5.2.7" />
</dependencies>
</metadata>
<files>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="DotNetNuke.Console" type="Module" version="09.10.01">
<package name="DotNetNuke.Console" type="Module" version="09.10.02">
<friendlyName>Console</friendlyName>
<description>Display children pages as icon links for navigation.</description>
<iconFile>~/DesktopModules/Admin/Console/console.png</iconFile>
Expand Down
Loading

0 comments on commit 4141ee8

Please sign in to comment.