-
Notifications
You must be signed in to change notification settings - Fork 0
mt bump
The bump command can be used to bump the semver-style version of a package or program. You can bump the major, minor, patch, or prerelease components of the version string.
Bumping a package version is a several step process, beyond the simple version string modification:
- The version string is updated in the pubspec.yaml file
- A version entry is made in the CHANGELOG.md file. If you do not provide a message on the command line, you will be prompted for one using your $EDITOR.
- Optionally git commit your work, using the supplied message as the commit message.
3a) Optionally push your work to the (GitHub/GitLab/etc.) git repository. - Optionally fix all the pubspec.yaml files in the monorepo subdirectories that refer to the updated package.
Consider 1.2.3-rc1 as a version string to be operated on.
This would update the example version string to 1.2.3-rc2
This would update the example version string to 1.2.4-rc1
This would update the example version string to 1.3.0-rc1
Note that the patch is set to 0 when bumping the minor component of the version string.
This would update the example version string to 2.0.0-rc1
Note that the patch and minor components of the version string are set to 0 when bumping the major component of the version string.
# mt help bump
========================
== mt by Modus Create ==
========================
bump version numbers
Usage: mt bump [arguments]
-h, --help Print this usage information.
-t, --type [major, minor, patch (default), prerelease]
-m, --message Message to add to CHANGELOG and for git commit
-f, --[no-]fix Update monorepo packages that refer to this (mt.yaml type package only)
-c, --[no-]commit Perform git commit using message
-p, --[no-]push Perform git commit using message, then do git push
Run "mt help" to see global options.