incrementVersion method

void incrementVersion(
  1. Spec spec,
  2. Version value
)

Implementation

void incrementVersion(Spec spec, Version value) {
  printVerbose('Increment version');

  final version = value.incrementPatchAndBuild();
  final content = spec.getContent();
  final updated =
      content.replaceFirst("version: $value", "version: $version");
  spec.saveContent(updated);
}