36 lines
1,010 B
Dart
36 lines
1,010 B
Dart
import 'package:libac_dart/argparse/Args.dart';
|
|
import 'package:libac_dart/argparse/Builder.dart';
|
|
import 'package:libac_dart/argparse/CLIHelper.dart';
|
|
import 'package:libac_dart/argparse/Parser.dart';
|
|
import 'package:libac_dart/argparse/types/Bool.dart';
|
|
import 'package:simplehelpertools/constants.dart';
|
|
|
|
String get CH_VERSION => HelperConsts.CH_VERSION;
|
|
|
|
Future<int> main(List<String> args) async {
|
|
print("Git Commit Helper\nVersion: $CH_VERSION\n\n");
|
|
|
|
Arguments defaults = ArgumentsBuilder.builder()
|
|
.withArgument(BoolArgument(
|
|
name: "help",
|
|
))
|
|
.withArgument(BoolArgument(
|
|
name: "commit",
|
|
))
|
|
.withArgument(BoolArgument(
|
|
name: "sign",
|
|
))
|
|
.withArgument(BoolArgument(
|
|
name: "force",
|
|
))
|
|
.build();
|
|
|
|
Arguments argx = ArgumentParser.parse(args);
|
|
if (argx.hasArg("help") || argx.count == 0) {
|
|
print(
|
|
ArgumentHelpers.generateHelpMessage(defaults.getArgumentsList(), "ch"));
|
|
return 0;
|
|
}
|
|
|
|
return 0;
|
|
}
|