Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New page for pub bump #6196

Merged
merged 6 commits into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions src/content/tools/pub/cmd/pub-bump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: dart pub bump
description: Use dart pub bump to increase the version number of the current package.
---

_Bump_ is one of the commands of the [pub tool](/tools/pub/cmd).

```plaintext
$ dart pub bump <subcommand> [options]
```

This command increments the version number of the current package.
Use one of the subcommands `breaking`, `major`, `minor`,
or `patch` according to the type of increment desired.

Refer to [semver](https://semver.org/spec/v2.0.0-rc.1.html) for guidance on versioning your package.
For example:

```console
$ dart pub bump minor
Updating version from 1.0.0 to 1.1.0

Diff:
- version: 1.0.0
+ version: 1.1.0

Remember to update `CHANGELOG.md` before publishing.
```

## Options

For options that apply to all pub commands, see
[Global options](/tools/pub/cmd#global-options).

### `-n, --dry-run`

Reports what would change for the version number under each subcommand,
and shows the version diff, without changing anything.