-
-
Notifications
You must be signed in to change notification settings - Fork 1
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 #62 from UpendoVentures/dev
Sync dev and main
- Loading branch information
Showing
21 changed files
with
1,159 additions
and
872 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,110 @@ | ||
<?xml version="1.0" encoding="windows-1252"?> | ||
<!-- | ||
The MIT License (MIT) | ||
Copyright (c) 2019 Upendo Ventures, LLC | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this | ||
software and associated documentation files (the "Software"), to deal in the Software | ||
without restriction, including without limitation the rights to use, copy, modify, | ||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to the following | ||
conditions: | ||
The above copyright notice and this permission notice shall be included in all copies | ||
or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | ||
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | ||
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" /> | ||
<Target Name="PackageModule" 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> | ||
|
||
<ItemGroup> | ||
<InstallInclude Include="**\*.txt" Exclude="**\obj\**;**\_ReSharper*\**;packages\**;" /> | ||
</ItemGroup> | ||
|
||
<CreateItem Include="$(LocalViewsetPath)\**\*.*"> | ||
<Output TaskParameter="Include" ItemName="Views" /> | ||
</CreateItem> | ||
|
||
<Copy SourceFiles="@(Views)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)"/> | ||
|
||
<!-- Deploy DLL's manually until Hotcakes has an installation manager --> | ||
<!--Copy SourceFiles="@(BinInstallInclude)" DestinationFolder="$(MSBuildProjectDirectory)\Package"/--> | ||
|
||
<CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*"> | ||
<Output TaskParameter="Include" ItemName="OutputContent" /> | ||
</CreateItem> | ||
|
||
<!-- Create the Install package --> | ||
<Zip Files="@(OutputContent)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Install.$(Extension)" /> | ||
|
||
<!-- Copy the Install package to the Packages folder --> | ||
<Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" DestinationFolder="$(WebsiteInstallPath)" /> | ||
|
||
<!-- Cleanup --> | ||
<Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" /> | ||
|
||
<RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" /> | ||
|
||
</Target> | ||
<?xml version="1.0" encoding="windows-1252"?> | ||
<!-- | ||
The MIT License (MIT) | ||
Copyright (c) 2019 Upendo Ventures, LLC | ||
Permission is hereby granted, free of charge, to any person obtaining a copy of this | ||
software and associated documentation files (the "Software"), to deal in the Software | ||
without restriction, including without limitation the rights to use, copy, modify, | ||
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to the following | ||
conditions: | ||
The above copyright notice and this permission notice shall be included in all copies | ||
or substantial portions of the Software. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF | ||
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | ||
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\("[0-9|\\.]%2A"\)" | ||
ReplacementText="AssemblyVersion("$(Version)")" /> | ||
<ReplaceFileText | ||
Filename="$(MSBuildProjectDirectory)\Properties\AssemblyInfo.cs" | ||
MatchExpression="AssemblyFileVersion\("[0-9|\\.]%2A"\)" | ||
ReplacementText="AssemblyFileVersion("$(Version)")" /> | ||
|
||
<!-- 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" | ||
XPath="dotnetnuke/packages/package[1]/@version" | ||
XmlFileName="$(DNNFileName).dnn"> | ||
<Output TaskParameter="Value" PropertyName="Version" /> | ||
</XmlRead> | ||
|
||
<ItemGroup> | ||
<InstallInclude Include="**\*.txt" Exclude="**\obj\**;**\_ReSharper*\**;packages\**;" /> | ||
</ItemGroup> | ||
|
||
<CreateItem Include="$(LocalViewsetPath)\**\*.*"> | ||
<Output TaskParameter="Include" ItemName="Views" /> | ||
</CreateItem> | ||
|
||
<Copy SourceFiles="@(Views)" DestinationFolder="$(MSBuildProjectDirectory)\Package\%(RecursiveDir)"/> | ||
|
||
<!-- Deploy DLL's manually until Hotcakes has an installation manager --> | ||
<!--Copy SourceFiles="@(BinInstallInclude)" DestinationFolder="$(MSBuildProjectDirectory)\Package"/--> | ||
|
||
<CreateItem Include="$(MSBuildProjectDirectory)\Package\**\*.*"> | ||
<Output TaskParameter="Include" ItemName="OutputContent" /> | ||
</CreateItem> | ||
|
||
<!-- Create the Install package --> | ||
<Zip Files="@(OutputContent)" WorkingDirectory="$(MSBuildProjectDirectory)\Package" ZipFileName="$(PackageName)_$(Version)_Install.$(Extension)" /> | ||
|
||
<!-- Copy the Install package to the Packages folder --> | ||
<Copy SourceFiles="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" DestinationFolder="$(WebsiteInstallPath)" /> | ||
|
||
<!-- Cleanup --> | ||
<Delete Files="$(MSBuildProjectDirectory)\$(PackageName)_$(Version)_Install.$(Extension)" /> | ||
|
||
<RemoveDir Directories ="$(MSBuildProjectDirectory)\Package" /> | ||
|
||
</Target> | ||
</Project> |
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,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> |
Oops, something went wrong.