Skip to content

Commit f0030dd

Browse files
Adding existing publisher option (#47)
* Added "Use Existing Solution" + Restructure code * Code restructuring. Added donation interface to plugin class * Final touches - resolve all bugs
1 parent 923ff67 commit f0030dd

31 files changed

+677
-40
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5+
<HasSharedItems>true</HasSharedItems>
6+
<SharedGUID>c4596662-c090-409d-9dd7-b48467a27bea</SharedGUID>
7+
</PropertyGroup>
8+
<PropertyGroup Label="Configuration">
9+
<Import_RootNamespace>Maverick.PCF.Builder.Common</Import_RootNamespace>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<Compile Include="$(MSBuildThisFileDirectory)StringHelper.cs" />
13+
</ItemGroup>
14+
</Project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<ProjectGuid>c4596662-c090-409d-9dd7-b48467a27bea</ProjectGuid>
5+
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
6+
</PropertyGroup>
7+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
8+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
9+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
10+
<PropertyGroup />
11+
<Import Project="Maverick.PCF.Builder.Common.projitems" Label="Shared" />
12+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
13+
</Project>
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
using Maverick.PCF.Builder.DataObjects;
5+
6+
namespace Maverick.PCF.Builder.Common
7+
{
8+
public class StringHelper
9+
{
10+
public PacVersionParsedDetails ParsePacVersionOutput(string output)
11+
{
12+
PacVersionParsedDetails details = new PacVersionParsedDetails();
13+
14+
if (!string.IsNullOrEmpty(output) && output.ToLower().Contains("microsoft powerapps cli"))
15+
{
16+
if (output.IndexOf("Version: ") > 0)
17+
{
18+
details.CurrentVersion = output.Substring(output.IndexOf("Version: ") + 8, output.IndexOf("+", output.IndexOf("Version: ") + 8) - (output.IndexOf("Version: ") + 8)).Trim();
19+
20+
//NOTE: A newer version of Microsoft.PowerApps.CLI has been found. Please run 'pac install latest' to install the latest version.
21+
if (output.ToLower().Contains("a newer version of microsoft.powerapps.cli has been found"))
22+
{
23+
details.ContainsLatestVersionNotification = true;
24+
}
25+
}
26+
else
27+
{
28+
details.UnableToDetectCLIVersion = true;
29+
}
30+
31+
}
32+
else
33+
{
34+
details.CLINotFound = true;
35+
}
36+
37+
return details;
38+
}
39+
}
40+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
5+
<HasSharedItems>true</HasSharedItems>
6+
<SharedGUID>59bd7754-9b8d-491c-a7b2-3707a2e88946</SharedGUID>
7+
</PropertyGroup>
8+
<PropertyGroup Label="Configuration">
9+
<Import_RootNamespace>Maverick.PCF.Builder.DataObjects</Import_RootNamespace>
10+
</PropertyGroup>
11+
<ItemGroup>
12+
<Compile Include="$(MSBuildThisFileDirectory)AuthenticationProfile.cs" />
13+
<Compile Include="$(MSBuildThisFileDirectory)ControlManifestDetails.cs" />
14+
<Compile Include="$(MSBuildThisFileDirectory)LanguageCode.cs" />
15+
<Compile Include="$(MSBuildThisFileDirectory)PacVersionParsedDetails.cs" />
16+
<Compile Include="$(MSBuildThisFileDirectory)PcfGallery.cs" />
17+
</ItemGroup>
18+
</Project>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<ProjectGuid>59bd7754-9b8d-491c-a7b2-3707a2e88946</ProjectGuid>
5+
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
6+
</PropertyGroup>
7+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
8+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
9+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
10+
<PropertyGroup />
11+
<Import Project="Maverick.PCF.Builder.DataObjects.projitems" Label="Shared" />
12+
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
13+
</Project>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Text;
4+
5+
namespace Maverick.PCF.Builder.DataObjects
6+
{
7+
public class PacVersionParsedDetails
8+
{
9+
public PacVersionParsedDetails()
10+
{
11+
ContainsLatestVersionNotification = false;
12+
CLINotFound = false;
13+
UnableToDetectCLIVersion = false;
14+
}
15+
16+
public string CurrentVersion { get; set; }
17+
public bool ContainsLatestVersionNotification { get; set; }
18+
public bool CLINotFound { get; set; }
19+
public bool UnableToDetectCLIVersion { get; set; }
20+
21+
}
22+
}

0 commit comments

Comments
 (0)