boostVersion static method

void boostVersion()

Implementation

static void boostVersion() async {
  final boostPattern = RegExp(
      r'(version:.\d*\.\d*\.)(\d*)(\+?(\-(beta)?(alpha)?(dev)?\.)?(\d*))');
  String pubspec = "";
  await File('pubspec.yaml').readAsString().then((String contents) {
    pubspec = contents;
  });
  pubspec = pubspec.replaceAllMapped(boostPattern,
      (match) => '${match[1]}${int.parse(match[2]!).plus()}${match[3]}');
  createFile('pubspec.yaml', pubspec);
}