dart_bump 1.0.6 copy "dart_bump: ^1.0.6" to clipboard
dart_bump: ^1.0.6 copied to clipboard

Dart automation tool for safe, consistent version bumps with CHANGELOG generation and Git/OpenAI integration.

example/dart_bump_example.dart

import 'dart:io';

import 'package:dart_bump/dart_bump.dart';

/// Usage:
/// dart dart_bump_example.dart [projectDir] [openaiApiKey]
///
/// - projectDir: path to the Dart project (defaults to current directory)
/// - openaiApiKey: OpenAI API key (optional; falls back to OPENAI_API_KEY env)
Future<void> main(List<String> args) async {
  final projectDir = Directory(
    args.isNotEmpty ? args[0] : Directory.current.path,
  );

  final apiKey = args.length > 1
      ? args[1]
      : Platform.environment['OPENAI_API_KEY'];

  final bump = DartBump(
    projectDir,
    changeLogGenerator: OpenAIChangeLogGenerator(apiKey: apiKey),
  );

  try {
    final result = await bump.bump();
    if (result == null) {
      print('❌ Nothing to bump.');
      return;
    }

    if (result.changeLogEntry != null) {
      print('πŸš€ Bump successful!');
    }
  } catch (e) {
    print('❌ Error: $e');
    exit(1);
  }
}
1
likes
160
points
284
downloads

Publisher

unverified uploader

Weekly Downloads

Dart automation tool for safe, consistent version bumps with CHANGELOG generation and Git/OpenAI integration.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

args_simple, path

More

Packages that depend on dart_bump