Skip to content

Commit

Permalink
Feature: add nuget metadata and icon, add additional targets to cli
Browse files Browse the repository at this point in the history
Feature:
- add nuget metadata
- add nuget icon
- add additional targets to cli
- fix license double up in core and custom projects
  • Loading branch information
kurtmkurtm committed Apr 2, 2021
1 parent 9f27b71 commit 5ad1f71
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 23 deletions.
Binary file added assets/nuget_cli.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 23 additions & 6 deletions src/LiquidTestReports.Cli/LiquidTestReports.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,51 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp2.1;netcoreapp3.1;net5.0</TargetFrameworks>
<PackAsTool>true</PackAsTool>
<ToolCommandName>liquid</ToolCommandName>
<PackageOutputPath>./nupkg</PackageOutputPath>
<RepositoryUrl>https://github.com/kurtmkurtm/LiquidTestReports</RepositoryUrl>
<PackageProjectUrl>https://github.com/kurtmkurtm/LiquidTestReports</PackageProjectUrl>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<PackageIcon>nuget_cli.png</PackageIcon>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Spectre.Console" Version="0.38.0" />
<PackageReference Include="System.CommandLine.DragonFruit" Version="0.3.0-alpha.20574.7" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\LiquidTestReports.Core\LiquidTestReports.Core.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\assets\nuget_cli.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<Compile Update="Resources\Templates.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Templates.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Resources\Templates.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Templates.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<PropertyGroup Label="Configuration">
<RootNamespace>LiquidTestReports.Cli</RootNamespace>
<Authors>Kurt Murrell</Authors>
<PackageId>LiquidTestReports.Cli</PackageId>
<Product>LiquidTestReports.Cli</Product>
<Copyright>2021</Copyright>
<Description>.NET tool to combine and convert TRX tests reports into Markdown with Liquid template support</Description>
</PropertyGroup>
</Project>
15 changes: 6 additions & 9 deletions src/LiquidTestReports.Cli/Loaders/TrxLoader.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
using LiquidTestReports.Cli.adapters;
using LiquidTestReports.Core.Drops;
using Schemas.VisualStudio.TeamTest;
using Schemas.VisualStudio.TeamTest;
using System.IO;
using System.Text.Json;
using System.Xml.Serialization;

namespace LiquidTestReports.Cli.Loaders
Expand All @@ -12,11 +9,11 @@ internal class TrxLoader
internal static TestRunType FromFile(string file)
{
var ser = new XmlSerializer(typeof(TestRunType));
using var reader = new StreamReader(file);

if (ser.Deserialize(reader) is TestRunType results)
return results;

using (var reader = new StreamReader(file))
{
if (ser.Deserialize(reader) is TestRunType results)
return results;
}
throw new InvalidDataException($"Provided file {file} could not be deserialised, check file is valid TRX XML");
}
}
Expand Down
4 changes: 0 additions & 4 deletions src/LiquidTestReports.Core/LiquidTestReports.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<PropertyGroup Label="Configuration">
<RootNamespace>LiquidTestReports.Core</RootNamespace>
Expand Down
4 changes: 0 additions & 4 deletions src/LiquidTestReports.Custom/LiquidTestReports.Custom.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="16.9.1" />
Expand Down

0 comments on commit 5ad1f71

Please sign in to comment.