Skip to content

Latest commit

 

History

History
42 lines (38 loc) · 1.22 KB

DEVELOPERS.md

File metadata and controls

42 lines (38 loc) · 1.22 KB

Coding style

  • unit tests should return a Result type. Example:
    #[test]
    fn is_equal_to_42() -> anyhow::Result<()> {
        let x = maybe_return_42()?;
        assert_eq!(x, 42);
        Ok(())
    }

Release process

To make a new release, and publish to crates.io, a new tagged commit needs to exist on the main branch. This is done with a simple merge from the dev branch. Do not push any other kinds of commits to the main branch.

Steps:

  1. bump the version. Will need cargo-release crate. Example here bumps the patch version (see cargo semver when deciding which version number to bump).
$ git checkout dev
$ cargo release changes  # note any changelog to add to the commit, or manually craft it
$ cargo release version patch --execute  # also note to update the readme
$ git add .
$ git commit
$ git push origin dev
  1. merge dev into main
$ git checkout main
$ git merge --no-ff dev
  1. tag the merge commit
$ git checkout main
$ cargo release tag --sign-tag --execute
  1. push with tags
$ git checkout main
$ git push
$ git push --tags