5 releases

0.1.4 Nov 14, 2024
0.1.3 Mar 3, 2024
0.1.2 Mar 3, 2024
0.1.1 Feb 19, 2024
0.1.0 Dec 27, 2023

#1915 in Command line utilities

Download history 2/week @ 2024-09-01 2/week @ 2024-09-08 45/week @ 2024-09-15 10/week @ 2024-09-22 25/week @ 2024-09-29 3/week @ 2024-10-06 17/week @ 2024-10-13 2/week @ 2024-10-20 31/week @ 2024-10-27 16/week @ 2024-11-03 131/week @ 2024-11-10 22/week @ 2024-11-17 14/week @ 2024-11-24 23/week @ 2024-12-01

190 downloads per month
Used in 7 crates

MIT license

19KB
324 lines

⬆️ Bump2version

Crates.io docs License

🚀 bump2version: A command-line tool for managing version numbers in your projects.

📖 Table of Contents

🚀 Quick Start

Get started with the bump2version CLI by following these simple steps:

  1. Install the bump2version tool using Cargo:

    cargo install bump2version
    
  2. Use the following options to manage version numbers and customize the behavior:

    bump2version --bump patch # or minor or major
    

🛠️ Configuration File

To customize the behavior of bump2version, you can use a configuration file named .bumpversion.toml. This file should be present in the root of your project. If it's not found, the cli will use default values.

Here's an example .bumpversion.toml configuration file you can use in your project:

[bumpversion]
current_version = 0.1.0 # Specify the current version of your project, samne value as Cargo.toml version

# Specify how to search for and replace the version in the 'Cargo.toml' file.
[bumpversion:file:Cargo.toml]
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

✨ Features

  • Incremental Versioning: Bump major, minor, or patch versions with ease.
  • Configurability: Use a configuration file or command-line options to customize behavior.
  • Git Integration: Create commits and tags in your version control system.

🎨 Options

Option Description
--config-file Config file to read most of the variables from (default: .bumpversion.toml).
--current-version Version that needs to be updated.
--bump Part of the version to be bumped (default: patch).
--parse Regex parsing the version string (default: \d+.\d+.\d+).
--serialize How to format what is parsed back to a version (default: {major}.{minor}.{patch}).
--dry-run Don't write any files, just pretend.
--new-version New version that should be in the files.
--commit Create a commit in version control (default: true).
--tag Create a tag in version control.
--message Commit message (default: Bump version: {current_version} → {new_version}).
file Files to change.

🌐 GitHub Repository

You can access the source code for this CLI tool on GitHub.

🤝 Contributing

Contributions and feedback are welcome! If you'd like to contribute, report an issue, or suggest an enhancement, please engage with the project on GitHub. Your contributions help improve this CLI tool for the community.

Dependencies

~3.5–5MB
~86K SLoC