Skip to content

Commit

Permalink
#401: Fixed handling of '=' in command line parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpalme committed Dec 26, 2020
1 parent e620614 commit 2f365e4
Show file tree
Hide file tree
Showing 16 changed files with 32 additions and 22 deletions.
2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ variables:
- name: disable.coverage.autogenerate
value: 'true'
- name: version
value: '4.8.2'
value: '4.8.3'

stages:
- stage: Build
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h3>Learn how to use</h3>
You only have to supply the path to your coverage report(s) and a target directory.<br />
If you are using MSBuild, you can also use an MSBuild task.
</p>
<p><a href="https://github.com/danielpalme/ReportGenerator#usage"><i class="fa fa-angle-double-right"></i> Learn more</a></p>
<p><a href="https://github.com/danielpalme/ReportGenerator#getting-started"><i class="fa fa-angle-double-right"></i> Learn more</a></p>
</div>
<div class="col-sm-6 hidden-xs text-center">
<i class="fa fa-info-circle biglogo"></i>
Expand Down
2 changes: 1 addition & 1 deletion src/AzureDevopsTask/ReportGenerator/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"version": {
"Major": 4,
"Minor": 8,
"Patch": 2
"Patch": 3
},
"instanceNameFormat": "ReportGenerator",
"groups": [
Expand Down
2 changes: 1 addition & 1 deletion src/AzureDevopsTask/vss-extension.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"manifestVersion": 1,
"id": "reportgenerator",
"name": "ReportGenerator",
"version": "4.8.2",
"version": "4.8.3",
"publisher": "Palmmedia",
"public": true,
"targets": [
Expand Down
6 changes: 5 additions & 1 deletion src/Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,13 @@ For further details take a look at LICENSE.txt.

CHANGELOG

4.8.3.0

* Fix: #401: Fixed handling of '=' in command line parameters

4.8.2.0

* Fix: #400: Allow suppling all parameters .netconfig
* Fix: #400: Allow suppling all parameters via .netconfig

4.8.1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<AssemblyName>ReportGenerator</AssemblyName>
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
<StartupObject>Palmmedia.ReportGenerator.Console.NetCore.Program</StartupObject>
<AssemblyVersion>4.8.2.0</AssemblyVersion>
<FileVersion>4.8.2.0</FileVersion>
<AssemblyVersion>4.8.3.0</AssemblyVersion>
<FileVersion>4.8.3.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/ReportGenerator.Console/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("4.8.2.0")]
[assembly: AssemblyFileVersion("4.8.2.0")]
[assembly: AssemblyVersion("4.8.3.0")]
[assembly: AssemblyFileVersion("4.8.3.0")]
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
<RootNamespace>Palmmedia.ReportGenerator.Core.Test</RootNamespace>
<AssemblyVersion>4.8.2.0</AssemblyVersion>
<FileVersion>4.8.2.0</FileVersion>
<AssemblyVersion>4.8.3.0</AssemblyVersion>
<FileVersion>4.8.3.0</FileVersion>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>

Expand Down
6 changes: 6 additions & 0 deletions src/ReportGenerator.Core/CommandLineArgumentNames.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text.RegularExpressions;

namespace Palmmedia.ReportGenerator.Core
{
Expand Down Expand Up @@ -89,6 +90,11 @@ internal static class CommandLineArgumentNames
.Select(x => (string)x.GetRawConstantValue())
.ToList());

/// <summary>
/// Gets the regex to parse command line parameters.
/// </summary>
internal static Regex CommandLineParameterRegex { get; } = new Regex("^-(?<key>[a-zA-Z]{2,}):(?<value>.+)$", RegexOptions.Compiled);

/// <summary>
/// Gets a value indicating whether a command line parameter name is valid.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/ReportGenerator.Core/Generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ private IConfigurationRoot GetConfiguration()
var args = Environment.GetCommandLineArgs()
.Where(a => !a.StartsWith("-property:"))
.Where(a => !a.StartsWith("-p:"))
.Where(a => !CommandLineArgumentNames.CommandLineParameterRegex.IsMatch(a))
.ToArray();

try
Expand Down
3 changes: 1 addition & 2 deletions src/ReportGenerator.Core/ReportConfigurationBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
using DotNetConfig;
using Palmmedia.ReportGenerator.Core.Logging;
using Palmmedia.ReportGenerator.Core.Properties;
Expand Down Expand Up @@ -247,7 +246,7 @@ internal ReportConfiguration Create(string[] args)

foreach (var arg in args)
{
var match = Regex.Match(arg, "-(?<key>\\w{2,}):(?<value>.+)");
var match = CommandLineArgumentNames.CommandLineParameterRegex.Match(arg);

if (match.Success)
{
Expand Down
4 changes: 2 additions & 2 deletions src/ReportGenerator.Core/ReportGenerator.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AssemblyName>ReportGenerator.Core</AssemblyName>
<AssemblyVersion>4.8.2.0</AssemblyVersion>
<FileVersion>4.8.2.0</FileVersion>
<AssemblyVersion>4.8.3.0</AssemblyVersion>
<FileVersion>4.8.3.0</FileVersion>
</PropertyGroup>

<PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp2.0;net5.0</TargetFrameworks>
<RootNamespace>ReportGenerator.DotnetCorePluginLoader</RootNamespace>
<AssemblyVersion>4.8.2.0</AssemblyVersion>
<FileVersion>4.8.2.0</FileVersion>
<AssemblyVersion>4.8.3.0</AssemblyVersion>
<FileVersion>4.8.3.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<AssemblyName>ReportGenerator</AssemblyName>
<RootNamespace>Palmmedia.ReportGenerator</RootNamespace>
<StartupObject>Palmmedia.ReportGenerator.DotnetGlobalTool.Program</StartupObject>
<AssemblyVersion>4.8.2.0</AssemblyVersion>
<FileVersion>4.8.2.0</FileVersion>
<AssemblyVersion>4.8.3.0</AssemblyVersion>
<FileVersion>4.8.3.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions src/ReportGenerator.MSBuild/ReportGenerator.MSBuild.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<RootNamespace>Palmmedia.ReportGenerator.MSBuild</RootNamespace>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<AssemblyVersion>4.8.2.0</AssemblyVersion>
<FileVersion>4.8.2.0</FileVersion>
<AssemblyVersion>4.8.3.0</AssemblyVersion>
<FileVersion>4.8.3.0</FileVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

<!-- Version, adjust before build -->
<PropertyGroup>
<Version>4.8.2</Version>
<Version>4.8.3</Version>
</PropertyGroup>

<!-- Tools -->
Expand Down

0 comments on commit 2f365e4

Please sign in to comment.