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 3 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
36 changes: 36 additions & 0 deletions src/content/tools/pub/cmd/pub-bump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
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> [arguments]
MaryaBelanger marked this conversation as resolved.
Show resolved Hide resolved
```

This command increments the verion number of the current package.
MaryaBelanger marked this conversation as resolved.
Show resolved Hide resolved
It allows the subcommands `breaking`, `major`, `minor`,
and `patch` to increment only a specific part of the version number.
MaryaBelanger marked this conversation as resolved.
Show resolved Hide resolved
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, and shows the version diff,
without changing anything.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not actually implemented (perhaps it should be though...)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh dry-run isn't implemented? It comes up a few times in the PR though, is that just like making space for it in the future?

I'll remove it anyway for now to land the page, just curious!

Copy link
Contributor

@sigurdm sigurdm Nov 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I'm sorry - you are totally right.

I was looking at dart pub bump --help but should of course look at dart pub bump <subcommand> --help.

And it is indeed implemented (by me...).

Thanks for pointing this out!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries! Thanks for explaining, I put it back and specified it's for each subcommand