Skip to content

Commit

Permalink
feat: export enable loggin
Browse files Browse the repository at this point in the history
  • Loading branch information
vanlooverenkoen committed Dec 11, 2023
1 parent a1c4839 commit e9faa4f
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/src/impaktfull_cli.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ import 'package:impaktfull_cli/src/integrations/one_password/plugin/one_password
import 'package:impaktfull_cli/src/integrations/playstore/plugin/playstore_plugin.dart';
import 'package:impaktfull_cli/src/integrations/testflight/plugin/testflight_plugin.dart';

typedef ImpaktfullCliRunner<T extends ImpaktfullCli> = Future<void> Function(T cli);
typedef ImpaktfullCliRunner<T extends ImpaktfullCli> = Future<void> Function(
T cli);

class ImpaktfullCli {
final ProcessRunner processRunner;
Expand Down Expand Up @@ -65,7 +66,8 @@ class ImpaktfullCli {

void _initPlugins() {
final onePasswordPlugin = OnePasswordPlugin(processRunner: processRunner);
final macOsKeyChainPlugin = MacOsKeyChainPlugin(processRunner: processRunner);
final macOsKeyChainPlugin =
MacOsKeyChainPlugin(processRunner: processRunner);
final flutterBuildPlugin = FlutterBuildPlugin(processRunner: processRunner);
final appCenterPlugin = AppCenterPlugin();
final testflightPlugin = TestFlightPlugin(processRunner: processRunner);
Expand Down Expand Up @@ -102,14 +104,16 @@ class ImpaktfullCli {
Future<void> runCli(List<String> args) async {
init();
await runImpaktfullCli(() async {
final runner = CommandRunner('impaktfull_cli', 'A cli that replaces `fastlane` by simplifying the CI/CD process.');
final runner = CommandRunner('impaktfull_cli',
'A cli that replaces `fastlane` by simplifying the CI/CD process.');
runner.argParser.addGlobalFlags();

for (final command in commands) {
runner.addCommand(command);
}
final argResults = runner.argParser.parse(args);
ImpaktfullCliLogger.init(isVerboseLoggingEnabled: argResults.isVerboseLoggingEnabled());
ImpaktfullCliLogger.init(
isVerboseLoggingEnabled: argResults.isVerboseLoggingEnabled());
await runner.run(args);
});
}
Expand Down

0 comments on commit e9faa4f

Please sign in to comment.