Skip to content

Releases: dotmake-build/command-line

DotMake.CommandLine v1.5.7

01 Jan 06:18
Compare
Choose a tag to compare
  • Made required behaviour for CliArgument and CliOption more sensible:
    If the decorated property has a default value (set via a property initializer), the argument/option is detected as "not required".
    If the decorated property does not have a default value, the argument/option is detected as "required".

    If you want to force an argument/option to be required, set this property to true. In that case,
    the default value for the decorated property will be ignored (if exists).
    If you want to force an argument/option to be not required, set this property to false.

DotMake.CommandLine v1.5.6

29 Dec 00:20
Compare
Choose a tag to compare
  • Fixed net472 and netstandard2.0 support. ModuleInitializerAttribute will be generated for legacy projects (missing before net5.0).

DotMake.CommandLine v1.5.5

27 Dec 11:58
Compare
Choose a tag to compare
  • Optimized enumerable/collection type parsing for CLI options/arguments. It's now fully compatible (stable) with AOT compilation !
    Arrays, lists, collections - any type that implements IEnumerable<T> and has a public constructor with a IEnumerable<T> or IList<T>
    parameter (other parameters, if any, should be optional).
    If type is generic IEnumerable<T>, IList<T>, ICollection<T> interfaces itself, array T[] will be used.
    If type is non-generic IEnumerable, IList, ICollection interfaces itself, array object[] will be used.

DotMake.CommandLine v1.5.4

25 Dec 02:06
Compare
Choose a tag to compare
  • Optimized custom type parsing for CLI options/arguments feature added in v1.5.0. It's now fully compatible (stable) with AOT compilation !

DotMake.CommandLine v1.5.2

23 Dec 04:45
Compare
Choose a tag to compare
  • Changed behaviour: Added Required property to CliArgumentAttribute, default is true for arguments.
    Default is false for options (already had Required property). Whether you specify a default value for a property will
    no longer effect the requirement of the argument or option. By contrast, when you set Required to true, the default value
    of the property will be ignored.
  • Beautified help output: Moved [required] label to description (second column), prevented display of empty [] default values.
    For wrong inputs, only errors will be shown and not the complete help output below.

DotMake.CommandLine v1.5.0

22 Dec 15:29
Compare
Choose a tag to compare
  • Added: For a CLI option or argument, any type with a public constructor or a static Parse method with a string parameter
    can be now be used. These types can be bound/parsed automatically even if they are wrapped with Enumerable or Nullable
    type (note that as of current version, custom class support when using AOT compilation is not stable but trimming works)

DotMake.CommandLine v1.4.0

19 Dec 10:58
Compare
Choose a tag to compare
  • Added CliHelpBuilder which allows overriding HelpBuilder easier and adds color support (argument and option names
    in first column will be white for more readability).
    Additional info will be printed when the app is run:
    The first line will be product name (from AssemblyProductAttribute or AssemblyName)
    and version (from AssemblyInformationalVersionAttribute, AssemblyFileVersionAttribute or AssemblyVersionAttribute).
    Second line will be copyright (from AssemblyCopyrightAttribute).
    Removed "Description" heading, description will be directly printed for root commands and name in white, semi-colon
    and then description will be printed for sub-commands.
  • Added OutputEncoding middleware for the console (by default Encoding.UTF8 is used, this is especially required to
    print the copyright symbol).
  • Cli.Parse methods will now return an instance of the definition class whose properties were bound/populated from
    the parse result. Optional signatures will allow access to parseResult with an out parameter.

DotMake.CommandLine v1.2.1

15 Dec 23:53
Compare
Choose a tag to compare
  • Source generator should produce files with space indents and not tab indents (indent size is 4)

DotMake.CommandLine v1.2.0

15 Dec 11:52
Compare
Choose a tag to compare
  • Dropped DotMake prefix from all classes to follow the .NET naming conventions.
    Namespace should be sufficient to prevent future conflicts.
    So the attribute names are now CliCommandAttribute, CliOptionAttribute, CliArgumentAttribute
    and main parse/run class name is now Cli.

DotMake.CommandLine v1.0.0

12 Dec 21:11
93974e8
Compare
Choose a tag to compare

Initial release.