pubspec_version 0.0.2 pubspec_version: ^0.0.2 copied to clipboard
A CLI tool to set/bump the `version` key in pubspec.yaml. Think of `npm version` for Dart.
pubspec-version #
A CLI tool to set/bump the version
key in pubspec.yaml. Semver-compliant*.
Usage #
Bumping the version #
Run pubspec-version bump <part>
to increment the version.
<part>
can be either breaking
, major
, minor
, or patch
.
E.g. if the current package version is 1.2.3
, running pubspec-version bump minor
will set it to 1.3.0
.
Setting the version #
Run pubspec-version set <version>
to set the version to <version>
.
Options #
-d <pubspec_directory>
provides the path to the directory containingpubspec.yaml
. Defaults to the current directory.-c
also doesgit commit . 'Release <version>'
andgit tag <version>
. Think ofnpm version
for Dart.
Output #
The tool prints the new version to stdout.
*almost. It uses pub_semver which is a bit different.