run method

  1. @override
void run()
override

Runs this command.

The return value is wrapped in a Future if necessary and returned by CommandRunner.runCommand.

Implementation

@override
void run() {
  final argGitsYaml = argResults.getOptionGitsYaml();

  YamlHelper.validateGitsYaml(argGitsYaml);

  final localizationHelper = LocalizationHelper(argGitsYaml);
  if (exists(join(current, localizationHelper.outputDir))) {
    deleteDir(join(current, localizationHelper.outputDir));
  }
  if (exists(join(current, 'ios', 'Podfile.lock'))) {
    delete(join(current, 'ios', 'Podfile.lock'));
  }

  MelosHelper.run('melos run clean:all');

  StatusHelper.success('gits_cli clean');
}