mirror of
https://github.com/SabreTools/SabreTools.CommandLine.git
synced 2026-02-03 21:29:53 +00:00
Add support for .NET 10
This commit is contained in:
8
.github/workflows/build_and_test.yml
vendored
8
.github/workflows/build_and_test.yml
vendored
@@ -9,17 +9,17 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
10.0.x
|
||||
|
||||
- name: Run tests
|
||||
run: dotnet test
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
git push origin rolling --force
|
||||
|
||||
- name: Upload to rolling
|
||||
uses: ncipollo/release-action@v1.14.0
|
||||
uses: ncipollo/release-action@v1.20.0
|
||||
with:
|
||||
allowUpdates: True
|
||||
artifacts: "*.nupkg,*.snupkg"
|
||||
|
||||
6
.github/workflows/check_pr.yml
vendored
6
.github/workflows/check_pr.yml
vendored
@@ -6,15 +6,15 @@ jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
|
||||
- name: Setup .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: |
|
||||
6.0.x
|
||||
8.0.x
|
||||
9.0.x
|
||||
10.0.x
|
||||
|
||||
- name: Build
|
||||
run: dotnet build
|
||||
|
||||
@@ -779,7 +779,7 @@ namespace SabreTools.CommandLine.Test
|
||||
[Fact]
|
||||
public void ProcessArgs_EmptyArgs_Success()
|
||||
{
|
||||
CommandSet commandSet = new CommandSet();
|
||||
var commandSet = new CommandSet();
|
||||
|
||||
string[] args = [];
|
||||
|
||||
@@ -790,7 +790,7 @@ namespace SabreTools.CommandLine.Test
|
||||
[Fact]
|
||||
public void ProcessArgs_ValidArgs_Success()
|
||||
{
|
||||
CommandSet commandSet = new CommandSet();
|
||||
var commandSet = new CommandSet();
|
||||
Feature feature = new MockFeature("a", "a", "a");
|
||||
feature.Add(new FlagInput("b", "b", "b"));
|
||||
feature.Add(new FlagInput("c", "c", "c"));
|
||||
@@ -806,7 +806,7 @@ namespace SabreTools.CommandLine.Test
|
||||
[Fact]
|
||||
public void ProcessArgs_InvalidArg_AddedAsGeneric()
|
||||
{
|
||||
CommandSet commandSet = new CommandSet();
|
||||
var commandSet = new CommandSet();
|
||||
Feature feature = new MockFeature("a", "a", "a");
|
||||
feature.Add(new FlagInput("b", "b", "b"));
|
||||
feature.Add(new FlagInput("d", "d", "d"));
|
||||
@@ -823,7 +823,7 @@ namespace SabreTools.CommandLine.Test
|
||||
[Fact]
|
||||
public void ProcessArgs_NestedArgs_Success()
|
||||
{
|
||||
CommandSet commandSet = new CommandSet();
|
||||
var commandSet = new CommandSet();
|
||||
Feature feature = new MockFeature("a", "a", "a");
|
||||
var sub = new FlagInput("b", "b", "b");
|
||||
sub.Add(new FlagInput("c", "c", "c"));
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
|
||||
<TargetFrameworks>net8.0;net9.0;net10.0</TargetFrameworks>
|
||||
<IsPackable>false</IsPackable>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<Nullable>enable</Nullable>
|
||||
@@ -16,7 +16,7 @@
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||
<PackageReference Include="xunit" Version="2.9.3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
||||
@@ -60,12 +60,12 @@ namespace SabreTools.CommandLine
|
||||
/// <remarks>
|
||||
/// It is recommended to use this in applications that
|
||||
/// do not need multiple distinct functional modes.
|
||||
///
|
||||
///
|
||||
/// When printing help text, the flags and description
|
||||
/// of this feature will be omitted, instead printing
|
||||
/// the children of the feature directly at the
|
||||
/// top level.
|
||||
///
|
||||
///
|
||||
/// If the default feature is included as a normal
|
||||
/// top-level input for the command set, then the flags
|
||||
/// will be printed twice - once under the feature
|
||||
@@ -162,11 +162,11 @@ namespace SabreTools.CommandLine
|
||||
/// <remarks>
|
||||
/// This should only be used in situations where an input is defined
|
||||
/// but not used within the context of the command set directly.
|
||||
///
|
||||
///
|
||||
/// This is helpful for when there are applications with default functionality
|
||||
/// that need to be able to expose both defined features as well as
|
||||
/// the default functionality in help text.
|
||||
///
|
||||
///
|
||||
/// If there is any overlap between existing names and the names from
|
||||
/// any of the children, this operation will overwrite them.
|
||||
/// </reamrks>
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="bool"/>
|
||||
/// Represents a user input bounded to the range of <see cref="bool"/>
|
||||
/// </summary>
|
||||
public class BooleanInput : UserInput<bool?>
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="short"/>
|
||||
/// Represents a user input bounded to the range of <see cref="short"/>
|
||||
/// </summary>
|
||||
public class Int16Input : UserInput<short?>
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="int"/>
|
||||
/// Represents a user input bounded to the range of <see cref="int"/>
|
||||
/// </summary>
|
||||
public class Int32Input : UserInput<int?>
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="long"/>
|
||||
/// Represents a user input bounded to the range of <see cref="long"/>
|
||||
/// </summary>
|
||||
public class Int64Input : UserInput<long?>
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="sbyte"/>
|
||||
/// Represents a user input bounded to the range of <see cref="sbyte"/>
|
||||
/// </summary>
|
||||
public class Int8Input : UserInput<sbyte?>
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="ushort"/>
|
||||
/// Represents a user input bounded to the range of <see cref="ushort"/>
|
||||
/// </summary>
|
||||
public class UInt16Input : UserInput<ushort?>
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="uint"/>
|
||||
/// Represents a user input bounded to the range of <see cref="uint"/>
|
||||
/// </summary>
|
||||
public class UInt32Input : UserInput<uint?>
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="ulong"/>
|
||||
/// Represents a user input bounded to the range of <see cref="ulong"/>
|
||||
/// </summary>
|
||||
public class UInt64Input : UserInput<ulong?>
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@ using System.Text;
|
||||
namespace SabreTools.CommandLine.Inputs
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a user input bounded to the range of <see cref="byte"/>
|
||||
/// Represents a user input bounded to the range of <see cref="byte"/>
|
||||
/// </summary>
|
||||
public class UInt8Input : UserInput<byte?>
|
||||
{
|
||||
|
||||
@@ -86,7 +86,7 @@ namespace SabreTools.CommandLine.Inputs
|
||||
/// </summary>
|
||||
public UserInput? this[UserInput subfeature]
|
||||
{
|
||||
get
|
||||
get
|
||||
{
|
||||
if (!Children.TryGetValue(subfeature.Name, out var input))
|
||||
return null;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Assembly Properties -->
|
||||
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>net20;net35;net40;net452;net462;net472;net48;netcoreapp3.1;net5.0;net6.0;net7.0;net8.0;net9.0;net10.0;netstandard2.0;netstandard2.1</TargetFrameworks>
|
||||
<CheckEolTargetFramework>false</CheckEolTargetFramework>
|
||||
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
|
||||
<IncludeSymbols>true</IncludeSymbols>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
|
||||
# This batch file assumes the following:
|
||||
# - .NET 9.0 (or newer) SDK is installed and in PATH
|
||||
# - .NET 10.0 (or newer) SDK is installed and in PATH
|
||||
#
|
||||
# If any of these are not satisfied, the operation may fail
|
||||
# in an unpredictable way and result in an incomplete output.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# This batch file assumes the following:
|
||||
# - .NET 9.0 (or newer) SDK is installed and in PATH
|
||||
# - .NET 10.0 (or newer) SDK is installed and in PATH
|
||||
#
|
||||
# If any of these are not satisfied, the operation may fail
|
||||
# in an unpredictable way and result in an incomplete output.
|
||||
|
||||
Reference in New Issue
Block a user