Skip to content

Commit

Permalink
Merge pull request #71 from UpendoVentures/dev
Browse files Browse the repository at this point in the history
Syncing dev with main
  • Loading branch information
WillStrohl authored Aug 25, 2023
2 parents 59ff6d3 + 352542b commit bbe5b1a
Show file tree
Hide file tree
Showing 17 changed files with 721 additions and 205 deletions.
48 changes: 48 additions & 0 deletions Build/HccViewsetPackage.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,54 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="MSBuild.Community.Tasks.Targets" />
<Import Project="$(BuildScriptsPath)\Helpers.Targets" />
<Target Name="SetVersion" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
XPath="dotnetnuke/packages/package[1]/@version"
XmlFileName="$(DNNFileName).dnn">
<Output TaskParameter="Value" PropertyName="Version" />
</XmlRead>

<ToShortVersion Version="$(Version)">
<Output PropertyName="sVersion" TaskParameter="ShortVersion" />
</ToShortVersion>

<!-- AssemblyInfo -->
<ReplaceFileText
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs"
MatchExpression="AssemblyVersion\(&quot;[0-9|\\.]%2A&quot;\)"
ReplacementText="AssemblyVersion(&quot;$(Version)&quot;)" />
<ReplaceFileText
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs"
MatchExpression="AssemblyFileVersion\(&quot;[0-9|\\.]%2A&quot;\)"
ReplacementText="AssemblyFileVersion(&quot;$(Version)&quot;)" />

<!-- Manifest -->
<ReplaceXmlAttributeValue
Filename="$(DNNFileName).dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/@version"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Assembly']/assemblies/assembly/version[../name/text() = '$(AssemblyName).dll']"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Script']/scripts/script[@type='UnInstall']/version"
NewValue="$(Version)" />

<!-- Symbols Manifest -->
<ReplaceXmlAttributeValue
Filename="$(DNNFileName)_Symbols.dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/@version"
NewValue="$(Version)" />
<ReplaceXmlAttributeValue
Filename="$(DNNFileName)_Symbols.dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/dependencies/dependency[@type='managedPackage'][text()='$(PackageName)']/@version"
NewValue="$(sVersion)" />

</Target>
<Target Name="PackageModule" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Expand Down
129 changes: 129 additions & 0 deletions Build/Helpers.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,129 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<UsingTask TaskName="ReplaceFileText" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Filename ParameterType="System.String" Required="true" />
<MatchExpression ParameterType="System.String" Required="true" />
<ReplacementText ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="cs">
<![CDATA[
File.WriteAllText(
Filename,
Regex.Replace(File.ReadAllText(Filename), MatchExpression, ReplacementText)
);
]]>
</Code>
</Task>
</UsingTask>
<UsingTask TaskName="ReplaceXmlNodeText" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Filename ParameterType="System.String" Required="true" />
<XPathNodeSelector ParameterType="System.String" Required="true" />
<NewValue ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Using Namespace="System" />
<Using Namespace="System.Xml" />
<Code Type="Fragment" Language="cs">
<![CDATA[
var xdoc = new XmlDocument();
xdoc.Load(Filename);
var nodes = xdoc.SelectNodes(XPathNodeSelector);
if(nodes != null)
{
foreach (XmlNode node in nodes)
{
node.InnerText = NewValue;
}
}
xdoc.Save(Filename);
]]>
</Code>
</Task>
</UsingTask>
<UsingTask TaskName="AppendXmlNodeText" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Filename ParameterType="System.String" Required="true" />
<XPathNodeSelector ParameterType="System.String" Required="true" />
<NewValue ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Using Namespace="System" />
<Using Namespace="System.Xml" />
<Code Type="Fragment" Language="cs">
<![CDATA[
var xdoc = new XmlDocument();
xdoc.Load(Filename);
var nodes = xdoc.SelectNodes(XPathNodeSelector);
if(nodes != null)
{
foreach (XmlNode node in nodes)
{
node.InnerText = node.InnerText + NewValue;
}
}
xdoc.Save(Filename);
]]>
</Code>
</Task>
</UsingTask>
<UsingTask TaskName="ReplaceXmlAttributeValue" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Filename ParameterType="System.String" Required="true" />
<XPathAttributeSelector ParameterType="System.String" Required="true" />
<NewValue ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Reference Include="System.Xml" />
<Using Namespace="System" />
<Using Namespace="System.Xml" />
<Code Type="Fragment" Language="cs">
<![CDATA[
var xdoc = new XmlDocument();
xdoc.Load(Filename);
var attributes = xdoc.SelectNodes(XPathAttributeSelector);
if (attributes != null)
{
foreach (XmlAttribute attribute in attributes)
{
attribute.Value = NewValue;
}
}
xdoc.Save(Filename);
]]>
</Code>
</Task>
</UsingTask>
<UsingTask TaskName="ToShortVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Version ParameterType="System.String" Required="true" />
<ShortVersion ParameterType="System.String" Output="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Code Type="Fragment" Language="cs">
<![CDATA[
ShortVersion = "";
foreach (var s in Version.Split('.'))
{
if(!string.IsNullOrEmpty(ShortVersion)) ShortVersion += ".";
ShortVersion += s.TrimStart('0');
if(ShortVersion.EndsWith(".")) ShortVersion += "0";
}
]]>
</Code>
</Task>
</UsingTask>

</Project>
48 changes: 48 additions & 0 deletions Build/LibraryPackage.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,54 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="MSBuild.Community.Tasks.Targets" />
<Import Project="$(BuildScriptsPath)\Helpers.Targets" />
<Target Name="SetVersion" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
XPath="dotnetnuke/packages/package[1]/@version"
XmlFileName="$(DNNFileName).dnn">
<Output TaskParameter="Value" PropertyName="Version" />
</XmlRead>

<ToShortVersion Version="$(Version)">
<Output PropertyName="sVersion" TaskParameter="ShortVersion" />
</ToShortVersion>

<!-- AssemblyInfo -->
<ReplaceFileText
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs"
MatchExpression="AssemblyVersion\(&quot;[0-9|\\.]%2A&quot;\)"
ReplacementText="AssemblyVersion(&quot;$(Version)&quot;)" />
<ReplaceFileText
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs"
MatchExpression="AssemblyFileVersion\(&quot;[0-9|\\.]%2A&quot;\)"
ReplacementText="AssemblyFileVersion(&quot;$(Version)&quot;)" />

<!-- Manifest -->
<ReplaceXmlAttributeValue
Filename="$(DNNFileName).dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/@version"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Assembly']/assemblies/assembly/version[../name/text() = '$(AssemblyName).dll']"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Script']/scripts/script[@type='UnInstall']/version"
NewValue="$(Version)" />

<!-- Symbols Manifest -->
<ReplaceXmlAttributeValue
Filename="$(DNNFileName)_Symbols.dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/@version"
NewValue="$(Version)" />
<ReplaceXmlAttributeValue
Filename="$(DNNFileName)_Symbols.dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/dependencies/dependency[@type='managedPackage'][text()='$(PackageName)']/@version"
NewValue="$(sVersion)" />

</Target>
<Target Name="PackageModule" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Expand Down
52 changes: 52 additions & 0 deletions Build/ModulePackage.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,58 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="MSBuild.Community.Tasks.Targets" />
<Import Project="$(BuildScriptsPath)\Helpers.Targets" />
<Target Name="SetVersion" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
XPath="dotnetnuke/packages/package[1]/@version"
XmlFileName="$(DNNFileName).dnn">
<Output TaskParameter="Value" PropertyName="Version" />
</XmlRead>

<ToShortVersion Version="$(Version)">
<Output PropertyName="sVersion" TaskParameter="ShortVersion" />
</ToShortVersion>

<!-- AssemblyInfo -->
<ReplaceFileText
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs"
MatchExpression="AssemblyVersion\(&quot;[0-9|\\.]%2A&quot;\)"
ReplacementText="AssemblyVersion(&quot;$(Version)&quot;)" />
<ReplaceFileText
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs"
MatchExpression="AssemblyFileVersion\(&quot;[0-9|\\.]%2A&quot;\)"
ReplacementText="AssemblyFileVersion(&quot;$(Version)&quot;)" />

<!-- Manifest -->
<ReplaceXmlAttributeValue
Filename="$(DNNFileName).dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/@version"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Assembly']/assemblies/assembly/version[../name/text() = '$(AssemblyName).dll']"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Script']/scripts/script[@type='UnInstall']/version"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Module']/eventMessage/attributes/upgradeVersionsList"
NewValue="$(Version)" />

<!-- Symbols Manifest -->
<ReplaceXmlAttributeValue
Filename="$(DNNFileName)_Symbols.dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/@version"
NewValue="$(Version)" />
<ReplaceXmlAttributeValue
Filename="$(DNNFileName)_Symbols.dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/dependencies/dependency[@type='managedPackage'][text()='$(PackageName)']/@version"
NewValue="$(sVersion)" />

</Target>
<Target Name="PackageModule" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Expand Down
48 changes: 48 additions & 0 deletions Build/SkinPackage.targets
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,54 @@ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-->
<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="MSBuild.Community.Tasks.Targets" />
<Import Project="$(BuildScriptsPath)\Helpers.Targets" />
<Target Name="SetVersion" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
XPath="dotnetnuke/packages/package[1]/@version"
XmlFileName="$(DNNFileName).dnn">
<Output TaskParameter="Value" PropertyName="Version" />
</XmlRead>

<ToShortVersion Version="$(Version)">
<Output PropertyName="sVersion" TaskParameter="ShortVersion" />
</ToShortVersion>

<!-- AssemblyInfo -->
<ReplaceFileText
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs"
MatchExpression="AssemblyVersion\(&quot;[0-9|\\.]%2A&quot;\)"
ReplacementText="AssemblyVersion(&quot;$(Version)&quot;)" />
<ReplaceFileText
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs"
MatchExpression="AssemblyFileVersion\(&quot;[0-9|\\.]%2A&quot;\)"
ReplacementText="AssemblyFileVersion(&quot;$(Version)&quot;)" />

<!-- Manifest -->
<ReplaceXmlAttributeValue
Filename="$(DNNFileName).dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/@version"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Assembly']/assemblies/assembly/version[../name/text() = '$(AssemblyName).dll']"
NewValue="$(Version)" />
<ReplaceXmlNodeText
Filename="$(DNNFileName).dnn"
XPathNodeSelector = "/dotnetnuke/packages/package[@name='$(PackageName)']/components/component[@type='Script']/scripts/script[@type='UnInstall']/version"
NewValue="$(Version)" />

<!-- Symbols Manifest -->
<ReplaceXmlAttributeValue
Filename="$(DNNFileName)_Symbols.dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/@version"
NewValue="$(Version)" />
<ReplaceXmlAttributeValue
Filename="$(DNNFileName)_Symbols.dnn"
XPathAttributeSelector = "/dotnetnuke/packages/package/dependencies/dependency[@type='managedPackage'][text()='$(PackageName)']/@version"
NewValue="$(sVersion)" />

</Target>
<Target Name="PackageSkin" Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<XmlRead Prefix="n"
Namespace="http://schemas.microsoft.com/developer/msbuild/2003"
Expand Down
3 changes: 3 additions & 0 deletions Modules/UserManager/App_LocalResources/AddEdit.resx
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,9 @@
<data name="PasswordMatch.Text" xml:space="preserve">
<value>Password and Confirmation Password must match.</value>
</data>
<data name="PasswordResetLink.Text" xml:space="preserve">
<value>Password Reset Link</value>
</data>
<data name="Save.Text" xml:space="preserve">
<value>Save</value>
</data>
Expand Down
Loading

0 comments on commit bbe5b1a

Please sign in to comment.