An open API service indexing awesome lists of open source software.

https://github.com/insign/dart_dpp

A better dart pub publish. Before publish, runs tests, fixes, lint, updates CHANGELOG, pubspec file and git commands.
https://github.com/insign/dart_dpp

dart

Last synced: 10 months ago
JSON representation

A better dart pub publish. Before publish, runs tests, fixes, lint, updates CHANGELOG, pubspec file and git commands.

Awesome Lists containing this project

README

          

# dpp

A better dart pub publish, by running tests, fixes, lint, update CHANGELOG file and git commands.

## Installing globally as CLI

```dart
dart pub global activate dpp
```

> If you receive a "Warning" just follow the instructions and reopen the console. If you need more help visit [Running a script from your PATH](https://dart.dev/tools/pub/cmd/pub-global#running-a-script-from-your-path).
>
> If you don't want to change your precious PATH, [go horse](https://gohorseprocess.com.br/extreme-go-horse-xgh/), just run `dart pub global run dpp`

## Simple CLI usage

```bash
dpp <1.2.3|patch|minor|major> [optional commit/changelog message]
```

Examples:

```bash
dpp 1.0.1 Typo fix
```

```bash
dpp minor New great feature # version will be 1.1.0
```

```bash
dpp major Rewritten code from Rust to Dart # 2.0.0
```

Simple run `dpp` to see all flags available.

>ProTip: create an alias "pp" with your default flags. If my standard do not fits for you. E.g. put the following in you bashrc/zshrc: `alias pp="dpp --no-git --no-tests"`

## Using internaly in only one project

```bash
dart pub add dev:dpp # dev: means you will use only in development
```

```dart
void main() {
final pubPublisher = DartPubPublish(git: false);

// Publish a new version with default message
pubPublisher.run('1.2.1'); // default message: 'Update version number'

// Publish a new version with a changelog message
pubPublisher.run('minor', message: 'Added a new feature');

print('Package published!');
}
```

## LICENSE

[BSD 3-Clause License](./LICENSE)

## CONTRIBUTE

If you have an idea for a new feature or have found a bug, just do a pull request (PR).