cargo-release

by sunng87

sunng87 / cargo-release

Cargo subcommand "release": everything about releasing a rust crate.

515 Stars 35 Forks Last release: 11 months ago (v0.13.0) Other 536 Commits 55 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

cargo release

Build Status Donate

Performs release best-practices, including:

  1. Ensure the git working directory is clean.
  2. Bump the version in Cargo.toml
  3. Create a git tag for this version
  4. Run
    cargo publish
    (if not disabled)
  5. Bump version for next development cycle
  6. git push

Features for workspaces include: - Report which crates might be able to be skipped - Update version ranges in dependent crates - Optionally using a single commit for all version bumps

Install

Current release: 0.13.8

cargo install cargo-release

Usage

cargo release [level]
  • 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

We recommend calling

cargo release --dry-run
with your custom options before actually executing it. The dry-run mode will print all commands to execute during the release process. And you will get an overview of what's going on.

Here is an example.

 $ cargo release --dry-run
cd .
git commit -S -am (cargo-release) version 0.18.3
cd -
cargo publish
Building and exporting docs.
cargo doc --no-deps
cd target/doc/
git init
cd -
cd target/doc/
git add .
cd -
cd target/doc/
git commit -S -am (cargo-release) generate docs
cd -
cd target/doc/
git push -f [email protected]:sunng87/handlebars-rust.git master:gh-pages
cd -
git tag -a 0.18.3 -m (cargo-release)  version 0.18.3 -s
Starting next development iteration 0.18.4-pre
cd .
git commit -S -am (cargo-release) start next development iteration 0.18.4-pre
cd -
git push origin --follow-tags

License

Licensed under either of

  • Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
  • MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) 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.

Donation

I'm now accepting donation on liberapay, if you find my work helpful and want to keep it going.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.