MCPcopy Index your code
hub / github.com/crate-ci/cargo-release

github.com/crate-ci/cargo-release @v1.1.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.1.2 ↗ · + Follow
347 symbols 941 edges 95 files 14 documented · 4%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

cargo release

Streamline your crate release process

cargo release extends cargo publish with common release practices like validation, version management, tagging, and pushing. The process is customizable but with defaults that should help you get up and running quickly.

Features include: - Ensure you are in a good state for release, including: - Right branch - Up-to-date with remote - Clean tree - Supports workspaces using cargo's native flags, like --workspace, --exclude and --package - Updates dependent crates in workspace when changing version - Change detection to help guide in what crates might not need a release - Optionally share commits - Handles cargo publish, tagging, and pushing - Pre-release search and replace for custom version updates, including - Updating changelogs - Update tags in Dockerfiles - Pre-release hook for extra customization, including - CHANGELOG generation

Install

Current release: 1.1.2

```console,ignore $ cargo install cargo-release


## Usage

```console,ignore
$ cargo release [level]
<dry-run output>
$ cargo release [level] --execute
  • See the reference for more on level, other CLI arguments, and configuration file format.
  • See also the FAQ for help in figuring out how to adapt cargo-release to your workflow.

Prerequisite

  • Your project should be managed by git.

Dry run

By default, cargo-release runs in dry-run mode so you can safely run it and verify what it will do. - Increase the logging level with each additional -v to get more details - Speed up dry-run by skipping cargo-publishs verify step with --no-verify

Once you are ready, pass the --execute flag.

Note: the packaging and verifying steps will list the current version and not the bumped version because cargo release delegates to cargo publish which does not know about the in-memory-only version bump (#890).

Related tools

Semver Compatibility

cargo-release's versioning tracks compatibility for the binaries, not the API. We upload to crates.io to distribute the binary. If using this as a library, be sure to pin the version with a = version requirement operator.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual-licensed as above, without any additional terms or conditions.

Extension points exported contracts — how you extend this code

VersionExt (Interface)
Additional version functionality [1 implementers]
src/ops/version.rs
CargoCommand (Interface)
Test the cargo command [1 implementers]
tests/testsuite/main.rs

Core symbols most depended-on inside this repo

assert_req_bump
called by 52
src/ops/version.rs
push
called by 34
src/config.rs
release
called by 29
src/config.rs
warn
called by 20
src/ops/shell.rs
update
called by 19
src/config.rs
error
called by 17
src/ops/shell.rs
registry
called by 15
src/config.rs
args
called by 15
src/config.rs

Shape

Function 194
Method 99
Class 38
Enum 14
Interface 2

Languages

Rust100%

Modules by API surface

src/config.rs77 symbols
src/ops/version.rs30 symbols
src/steps/mod.rs24 symbols
src/ops/cargo.rs21 symbols
src/steps/plan.rs14 symbols
src/ops/git.rs14 symbols
src/ops/shell.rs13 symbols
src/bin/cargo-release.rs10 symbols
src/steps/changes.rs9 symbols
src/ops/index.rs8 symbols
src/steps/version.rs7 symbols
src/steps/publish.rs7 symbols

For agents

$ claude mcp add cargo-release \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact