bump_version 0.1.3
bump_version: ^0.1.3 copied to clipboard
A CLI tool to auto-bump the version and build number in a Flutter/Dart pubspec.yaml before each release build.
example/example.dart
// Run from the `example` directory with: dart run example.dart
//
// Demonstrates using the `bump_version` library API directly, without
// going through the `bump_version` CLI.
import 'package:bump_version/bump_version.dart';
void main() {
final lines = ['name: my_app', 'version: 1.2.3+7'];
final result = bumpPubspecLines(lines, BumpType.patch);
print('New version: ${result.newVersion}');
print(result.lines.join('\n'));
}