- Notifications
You must be signed in to change notification settings - Fork35
Conventional commits, changelog, versioning, validation
License
convco/convco
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
A Conventional commit cli.
Documentation:https://convco.github.io.
convco gives tools to work withConventional Commits.
It provides 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.convco completions: Generates tab completions for shells (exists only with the featurecompletionsenabled).
cargo install convco
Rust 1.60 or newer is required.
Building withcargo depends ongit2 andcmake due to linking withzlib-ng.You can optionally disable this by changing the defaults for a build:
cargo build --no-default-features
convco uses follows theconventional-changelog-config-spec.
The configuration file is loaded in the following order
- Load the internal defaults
- specified insrc/conventional/config.rs,
- see these defaults at
convco config --default.
- Then override with values from the command line,
convco -c|--config path/to/.convco - Or, if not specified via
-c|--config, load${PWD}/.convcoif it exists (or${PWD}/.versionrcfor compatibility with conventional-changelog).
To get the final derived configuration runconvco config.
Thehost: ...,owner: ... andrepository: ... when not supplied via custom or the.versionrc are loadedfrom thegit remote origin value.
# build the convco imagedocker build -t convco.# run it on any codebasedocker run -v"$PWD:/tmp" --workdir /tmp --rm convco
or use it from the Docker Hub:
docker run -v"$PWD:/tmp" --workdir /tmp --rm convco/convcoIf you've created an image and pushed it into your private registry
convco:check:stage:testimage:name:convco/convco:latestscript: -check
A changelog can be generated using the conventional commits.It is inspired byconventional changelog and theconfiguration file allows changes to the generated the output.
convco changelog> CHANGELOG.mdCheck 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
Helps to make conventional commits.A scope, description, body, breaking change and issues will be prompted.Convco will recover the previous message in case git failed to create the commit.
convco commit --feat
convco commit can also be used as gitcore.editor.In this caseconvco commit will not invokegit commit, butgit will invokeconvco commit
e.g.:
GIT_EDITOR='convco commit' git commit -pWhen persisting the git editor also setsequence.editor when editing the todo list of an interactive rebase.
Or configure a git alias:
git config --global alias.convco'!GIT_EDITOR="convco commit" git commit'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 ascargo-release:
cargo release$(convco version --bump)Note
This subcommand requires the featurecompletions to be enabled.
Generates tab completion for the current shell
convco completions
If your shell cannot be detected (the$SHELL variable isn't present) you can specify the shell you want completions generated for.
convco completions bash
The tab completions will be outputed to the stdout so you may want to output them to a certain file to save them for future use. Here are some example files for given shells:
- Bash:
/usr/share/bash-completion/completions/convco - Zsh:
/usr/share/zsh/site-functions/_convco - Fish:
/usr/share/fish/vendor_completions.d/convco.fish - Elvish:
/usr/share/elvish/lib/convco.elv
About
Conventional commits, changelog, versioning, validation
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.