12 releases

0.3.5 May 1, 2021
0.3.4 Mar 15, 2021
0.3.3 Feb 12, 2021
0.3.2 Oct 29, 2020
0.1.1 Dec 29, 2019

#29 in Build Utils

Download history 6/week @ 2021-02-23 5/week @ 2021-03-02 9/week @ 2021-03-09 21/week @ 2021-03-16 24/week @ 2021-03-23 24/week @ 2021-03-30 12/week @ 2021-04-06 29/week @ 2021-04-13 61/week @ 2021-04-20 27/week @ 2021-04-27 12/week @ 2021-05-04 11/week @ 2021-05-11 20/week @ 2021-05-18 6/week @ 2021-05-25 9/week @ 2021-06-01 18/week @ 2021-06-08

98 downloads per month

MIT license

77KB
2K SLoC

Convco

GitHub Workflow Status Crates.io

A Conventional commit cli.

convco gives tools to work with Conventional Commits.

The tool is still in early development. It provides already the following commands:

  • convco changelog: Create a changelog file.
  • convco check: Checks if a range of commits is following the convention.
  • convco commit: Helps to make conventional commits.
  • convco version: Finds out the current or next version.

Installation

cargo install convco

Docker usage

# build the convco image
docker build -t convco .
# run it on any codebase
docker run -v "$PWD:/tmp" --workdir /tmp --rm convco

Use it in .gitlab-ci.yml

If you've created an image and pushed it into your private registry

convco:check:
  stage: test
  image:
    name: convco/convco:latest
  script:
    - check

Tools

Changelog

A changelog can be generated using the conventional commits. It is inspired by conventional changelog. Configuration follows the conventional-changelog-config-spec

convco changelog > CHANGELOG.md

Check

Check a range of revisions for compliance.

It returns a non zero exit code if some commits are not conventional. This is useful in a pre-push hook.

convco check $remote_sha..$local_sha

Commit

Helps to make conventional commits. A scope, description, body, breaking change and issues will be prompted.

# commit a new feature and then run git commit with the interactive patch switch
convco commit --feat -- --patch

Version

When no options are given it will return the current version. When --bump is provided, the next version will be printed out. Conventional commits are used to calculate the next major, minor or patch. If needed one can provide --major, --minor or --patch to overrule the convention.

convco version --bump

It is useful to use it with release tools, such as cargo-release:

cargo release $(convco version --bump)

TODO

  • automatic notes for breaking changes
  • custom template folder
  • use a .versionrc file
  • limit to a range of versions
  • sort sections in changelog
  • issue references
  • better documentation
  • better error handling

Dependencies

~20MB
~455K SLoC