9 unstable releases (4 breaking)

0.8.0 Nov 10, 2024
0.7.0 May 4, 2024
0.6.2 May 25, 2023
0.6.1 Apr 2, 2023
0.4.5 Jul 31, 2022

#321 in Configuration

Download history 13/week @ 2024-09-23 2/week @ 2024-09-30 40/week @ 2024-11-04 71/week @ 2024-11-11

111 downloads per month

MIT license

74KB
2K SLoC

bomper

github crates.io docs.rs

bomper is a one-stop shop CLI tool that can update version strings in project files and maintain your project's changelog.

  • automatically bump semver strings in project files
  • changelog generation based on conventional commits
  • no system-level dependencies: bomper produces a statically compiled binary thanks to gitoxide

foreword

bomper was originally created to be used as a hook in cocogitto. cocogitto does not update version strings in project files, so bomper was created to fill that gap. Their implementation changelog implementation is more full-featured and configurable than bomper, so for projects that require this flexibility in changelog generation, consider using cocogitto instead. You can still use bomper as a hook without the changelog generation.

bomper aims to be a simpler, more focused, and opinionated tool that can be customized to fit your needs.

usage

Run bomp --help to view the instructions.

In order for bomper to work, it must be told where to find the files that need to be updated. The configuration supports either arbitrary files or a number of supported project types (currently only cargo, but this can be added to). This configuration is specified in a bomp.ron file. The file can be in the root-level of the project, in the ${PRJ_CONFIG_HOME} directory, or specified with the --config-file flag. See ./examples for some specific examples of configuration files.

There are three main commands: bump, changelog, and raw-bump. The bump command will update the version strings in the files specified by the bomp.ron file, add changes to the changelog, create a commit, and tag the changes. The changelog command will generate and display a changelog based on the commit messages in the repository, but will not update any files. The raw-bump command will update the version strings in the files specified by the bomp.ron file, but will not add changes to the changelog, commit, or tag the changes.

flake module

A flake-parts module is provided to allow integration of bomper without needing to keep a bomp.ron file in your project's files. It works by creating a script that wraps the bomper command and passes the bomp.ron file as an argument. The configuration to use is specified as a nix module option so that it can live inside your nix configuration. To use this you must use flake-parts, import the flake module, and specify the options in a perSystem block. See ./flake-parts/bomper.nix for an example of its usage - this project dogfoods the module.

With the module enabled, you can access the wrapped bomper package using the config parameter of a perSystem block: config.bomper.wrappedBomper.

Contributing

The main dependency for working on this project is nix. To work on this project, first ensure that Nix: the package manager is available on your system. A flake.nix is provided for configuring a development environment. To use this, enter a dev shell: nix develop

Dependencies

~25–38MB
~610K SLoC