exec method

  1. @override
Future<void> exec(
  1. ExecContext context
)
override

Run command.

The contents of katana.yaml and the arguments of the command are passed to context.

コマンドを実行します。

contextkatana.yamlの内容やコマンドの引数が渡されます。

Implementation

@override
Future<void> exec(ExecContext context) async {
  final regExp = RegExp(r".cer$");
  final cer = await find(Directory("ios"), regExp);
  if (cer == null) {
    return;
  }
  final dateTime = await cer.lastModified();
  final duration = DateTime.now().difference(dateTime);
  if (duration.inDays > 300) {
    throw Exception(
      "Cer file is too old. Please update it from https://mathru.notion.site/AppStoreConnect-ID-f516ff1a767146f69acd6780fbcf20fe",
    );
  }
}