Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v9.11.0 Bump WebFormsMVP from 1.4.1.0 to 1.4.5 #5017

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions Build/Tasks/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// See the LICENSE file in the project root for more information
namespace DotNetNuke.Build.Tasks
{
using System;
using System.Collections.Generic;

using Cake.Common.Build;
Expand All @@ -13,7 +14,6 @@ namespace DotNetNuke.Build.Tasks
using Cake.Frosting;
using Cake.Issues;
using Cake.Issues.MsBuild;

using DotNetNuke.Build;

/// <summary>A cake task to compile the platform.</summary>
Expand Down Expand Up @@ -55,13 +55,20 @@ public override void Run(Context context)

foreach (var issue in issues)
{
context.AzurePipelines()
.Commands.WriteWarning(
issue.MessageText,
new AzurePipelinesMessageData
{
SourcePath = issue.AffectedFileRelativePath?.FullPath, LineNumber = issue.Line,
});
var messageData = new AzurePipelinesMessageData
{
SourcePath = issue.AffectedFileRelativePath?.FullPath,
LineNumber = issue.Line,
};

if (string.Equals(issue.PriorityName, "Error", StringComparison.Ordinal))
{
context.AzurePipelines().Commands.WriteError(issue.MessageText, messageData);
}
else
{
context.AzurePipelines().Commands.WriteWarning(issue.MessageText, messageData);
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions Build/Tasks/OtherPackages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ namespace DotNetNuke.Build.Tasks
[IsDependentOn(typeof(PackageAspNetWebPages))]
[IsDependentOn(typeof(PackageAspNetMvc))]
[IsDependentOn(typeof(PackageMicrosoftGlobbing))]
[IsDependentOn(typeof(PackageWebFormsMvp))]
public sealed class OtherPackages : FrostingTask<Context>
{
/// <inheritdoc/>
Expand Down
68 changes: 68 additions & 0 deletions Build/Tasks/PackageWebFormsMvp.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 WebFormsMvp package.</summary>
public sealed class PackageWebFormsMvp : FrostingTask<Context>
{
/// <inheritdoc/>
public override void Run(Context context)
{
var binDir = context.WebsiteDir.Path.Combine("bin");
var mainAssemblyPath = binDir.CombineWithFilePath("WebFormsMvp.dll");
var packageVersion = FileVersionInfo.GetVersionInfo(context.MakeAbsolute(mainAssemblyPath).FullPath).FileVersion;

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

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);
}
}
}
36 changes: 36 additions & 0 deletions DNN Platform/Components/WebFormsMvp/License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
Copyright (c) 2009, The Outercurve Foundation. The software is licensed under the (the "License"); you may not use the software except in compliance with the License.

The text of the Ms-PL License 2.0 can be found online at:
http://www.opensource.org/licenses/ms-pl

Microsoft Public License (Ms-PL)

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions

The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.

A "contribution" is the original software, or any additions or changes to the software.

A "contributor" is any person that distributes its contribution under this license.

"Licensed patents" are a contributor's patent claims that read directly on its contribution.

2. Grant of Rights

(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.

(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations

(A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.

(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.

(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.

(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.

(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.
28 changes: 28 additions & 0 deletions DNN Platform/Components/WebFormsMvp/WebFormsMvp.dnn
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<dotnetnuke type="Package" version="5.0">
<packages>
<package name="DotNetNuke.WebFormsMvp" type="Library" version="1.4.5">
<friendlyName>WebFormsMvp</friendlyName>
<description>Library for module development using MVP pattern.</description>
<dependencies/>
<owner>
<name>DNN</name>
<organization>.NET Foundation</organization>
<url>https://dnncommunity.org</url>
<email>info@dnncommunity.org</email>
</owner>
<license src="License.txt"/>
<releaseNotes>https://github.com/webformsmvp/webformsmvp/releases</releaseNotes>
<components>
<component type="Assembly">
<assemblies>
<assembly>
<path>bin</path>
<name>WebFormsMvp.dll</name>
<version>1.4.5</version>
</assembly>
</assemblies>
</component>
</components>
</package>
</packages>
</dotnetnuke>
5 changes: 3 additions & 2 deletions DNN Platform/DotNetNuke.Web/DotNetNuke.Web.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@
<Private>True</Private>
</Reference>
<Reference Include="System.Xml" />
<Reference Include="WebFormsMvp">
<HintPath>..\..\Packages\WebFormsMVP.1.4.1.0\lib\WebFormsMvp.dll</HintPath>
<Reference Include="WebFormsMvp, Version=1.4.5.0, Culture=neutral, PublicKeyToken=537f18701145dff0">
<HintPath>..\..\packages\WebFormsMvp.1.4.5.0\lib\WebFormsMvp.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/DotNetNuke.Web/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WebFormsMvp" version="1.4.5.0" targetFramework="net472" />
<package id="Dnn.ClientDependency" version="1.9.10" targetFramework="net472" />
<package id="Microsoft.AspNet.Razor" version="3.2.7" targetFramework="net472" />
<package id="Microsoft.AspNet.WebApi" version="5.2.7" targetFramework="net472" />
Expand All @@ -15,5 +16,4 @@
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
<package id="StyleCop.Analyzers" version="1.1.118" targetFramework="net472" developmentDependency="true" />
<package id="WebFormsMVP" version="1.4.1.0" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Web.Mobile" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WebFormsMvp">
<HintPath>..\..\..\packages\WebFormsMVP.1.4.1.0\lib\WebFormsMvp.dll</HintPath>
<Reference Include="WebFormsMvp, Version=1.4.5.0, Culture=neutral, PublicKeyToken=537f18701145dff0">
<HintPath>..\..\..\packages\WebFormsMvp.1.4.5.0\lib\WebFormsMvp.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Modules/HtmlEditorManager/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WebFormsMvp" version="1.4.5.0" targetFramework="net472" />
<package id="StyleCop.Analyzers" version="1.1.118" targetFramework="net472" developmentDependency="true" />
<package id="WebFormsMVP" version="1.4.1.0" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@
<Reference Include="System.Web.Routing" />
<Reference Include="System.Xml" />
<Reference Include="System.Xml.Linq" />
<Reference Include="WebFormsMvp">
<HintPath>..\..\..\packages\WebFormsMVP.1.4.1.0\lib\WebFormsMvp.dll</HintPath>
<Reference Include="WebFormsMvp, Version=1.4.5.0, Culture=neutral, PublicKeyToken=537f18701145dff0">
<HintPath>..\..\..\packages\WebFormsMvp.1.4.5.0\lib\WebFormsMvp.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Modules/MemberDirectory/packages.config
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WebFormsMvp" version="1.4.5.0" targetFramework="net472" />
<package id="Microsoft.AspNet.WebApi" version="5.2.7" targetFramework="net472" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net472" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net472" />
<package id="Microsoft.AspNet.WebApi.WebHost" version="5.2.7" targetFramework="net472" />
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
<package id="StyleCop.Analyzers" version="1.1.118" targetFramework="net472" developmentDependency="true" />
<package id="WebFormsMVP" version="1.4.1.0" targetFramework="net45" />
</packages>
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WebFormsMvp">
<HintPath>..\..\..\packages\WebFormsMVP.1.4.1.0\lib\WebFormsMvp.dll</HintPath>
<Reference Include="WebFormsMvp, Version=1.4.5.0, Culture=neutral, PublicKeyToken=537f18701145dff0">
<HintPath>..\..\..\packages\WebFormsMvp.1.4.5.0\lib\WebFormsMvp.dll</HintPath>
<Private>True</Private>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion DNN Platform/Tests/DotNetNuke.Tests.Web/packages.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="WebFormsMvp" version="1.4.5.0" targetFramework="net472" />
<package id="Microsoft.AspNet.WebApi" version="5.2.7" targetFramework="net472" />
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.7" targetFramework="net472" />
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.7" targetFramework="net472" />
Expand All @@ -11,5 +12,4 @@
<package id="NUnit" version="3.13.2" targetFramework="net472" />
<package id="NUnit3TestAdapter" version="4.2.0" targetFramework="net472" />
<package id="StyleCop.Analyzers" version="1.1.118" targetFramework="net472" developmentDependency="true" />
<package id="WebFormsMVP" version="1.4.1.0" targetFramework="net45" />
</packages>