Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<!-- the tool -->
<ItemGroup>
<PackageVersion Include="MinVer" Version="8.0.0" />
<PackageVersion Include="Nullean.Argh" Version="0.30.0" />
<PackageVersion Include="Nullean.Argh" Version="0.30.1" />
<PackageVersion Include="Proc" Version="0.22.1" />
<PackageVersion Include="NuGet.Common" Version="8.0.0" />
<PackageVersion Include="NuGet.Frameworks" Version="8.0.0" />
Expand Down
7 changes: 3 additions & 4 deletions src/assembly-differ/ApiCommands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ public sealed class ReportOptions
/// <summary>-o, --output, A directory or file to write the report to, besides the console.</summary>
public string? Output { get; set; }

/// <summary>Exit with code 4 when the suggested version change is at least this: none (never), patch, minor or major.</summary>
[AllowedValues("none", "patch", "minor", "major")]
public string FailOn { get; set; } = "none";
/// <summary>Exit with code 4 when the suggested version change is at least this; none never fails.</summary>
public SuggestedVersionChange FailOn { get; set; } = SuggestedVersionChange.None;
}

/// <summary>Compares the public API of two versions of a library and suggests the version change it calls for.</summary>
Expand Down Expand Up @@ -260,7 +259,7 @@ private static int Run(
{
if (sides() is not var (oldSide, newSide))
return null;
var failOn = Enum.Parse<SuggestedVersionChange>(report.FailOn, ignoreCase: true);
var failOn = report.FailOn;
return DiffRunner.Run(
oldSide,
newSide,
Expand Down
2 changes: 1 addition & 1 deletion src/assembly-differ/Projects/ProjectComparison.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public static int Run(string directory, Options options, ReportOptions report)
}

var targets = new HashSet<string>(report.Target ?? projects.Select(p => p.AssemblyName), StringComparer.OrdinalIgnoreCase);
var failOn = Enum.Parse<SuggestedVersionChange>(report.FailOn, ignoreCase: true);
var failOn = report.FailOn;
return DiffRunner.Run(
new DiffSide(new CompositeAssemblyProvider(oldAssemblies.Select(s => s.Provider)), "projects"),
new DiffSide(new CompositeAssemblyProvider(newAssemblies.Select(s => s.Provider)), "projects"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ Options:
-t, --target <values> [repeatable] Only compare these assemblies, by file name without extension. Repeat it for more than one.
-f, --format <string> The report: markdown, xml, asciidoc, github-comment or json. [default: markdown] [allowed: markdown|xml|asciidoc|github-comment|json]
-o, --output <string> A directory or file to write the report to, besides the console.
--fail-on <string> Exit with code 4 when the suggested version change is at least this: none (never), patch, minor or major. [default: none] [allowed: none|patch|minor|major]
--fail-on <enum> Exit with code 4 when the suggested version change is at least this; none never fails. [default: none]
One of: <none|patch|minor|major>

Examples:
assembly-differ files bin/1.2.0/MyLib.dll bin/1.3.0/MyLib.dll
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Options:
-t, --target <values> [repeatable] Only compare these assemblies, by file name without extension. Repeat it for more than one.
-f, --format <string> The report: markdown, xml, asciidoc, github-comment or json. [default: markdown] [allowed: markdown|xml|asciidoc|github-comment|json]
-o, --output <string> A directory or file to write the report to, besides the console.
--fail-on <string> Exit with code 4 when the suggested version change is at least this: none (never), patch, minor or major. [default: none] [allowed: none|patch|minor|major]
--fail-on <enum> Exit with code 4 when the suggested version change is at least this; none never fails. [default: none]
One of: <none|patch|minor|major>

Notes:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ Options:
-t, --target <values> [repeatable] Only compare these assemblies, by file name without extension. Repeat it for more than one.
-f, --format <string> The report: markdown, xml, asciidoc, github-comment or json. [default: markdown] [allowed: markdown|xml|asciidoc|github-comment|json]
-o, --output <string> A directory or file to write the report to, besides the console.
--fail-on <string> Exit with code 4 when the suggested version change is at least this: none (never), patch, minor or major. [default: none] [allowed: none|patch|minor|major]
--fail-on <enum> Exit with code 4 when the suggested version change is at least this; none never fails. [default: none]
One of: <none|patch|minor|major>

Notes:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ Options:
-t, --target <values> [repeatable] Only compare these assemblies, by file name without extension. Repeat it for more than one.
-f, --format <string> The report: markdown, xml, asciidoc, github-comment or json. [default: markdown] [allowed: markdown|xml|asciidoc|github-comment|json]
-o, --output <string> A directory or file to write the report to, besides the console.
--fail-on <string> Exit with code 4 when the suggested version change is at least this: none (never), patch, minor or major. [default: none] [allowed: none|patch|minor|major]
--fail-on <enum> Exit with code 4 when the suggested version change is at least this; none never fails. [default: none]
One of: <none|patch|minor|major>

Notes:

Expand Down
Loading