No description
- Python 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo/workflows | ||
| .fragcha | ||
| fragcha | ||
| .gitignore | ||
| agpl-3.0.md | ||
| CHANGELOG.md | ||
| fragcha.json5 | ||
| LICENSE.md | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
Fragcha - Automate changelog from fragments
Installation
pip install https://gitea.holm.dev/kjh/fragcha/archive/main.tar.gz
Usage
usage: python -m fragcha [-h] [--fragments FRAGMENTS] [--config CONFIG] {bump,changelog} ...
positional arguments:
{bump,changelog}
bump Generate subsequent semver based on changelog fragments
changelog Generate changelog from fragments
options:
-h, --help show this help message and exit
--fragments FRAGMENTS
Folder with changelog fragments (.yaml or .yml)
--config CONFIG Path to config file
usage: python -m fragcha bump [-h] --version VERSION [--output OUTPUT] [--ignore-major-zero]
options:
-h, --help show this help message and exit
--version VERSION Current version for which to generate the subsequent semver
--output OUTPUT File append changelog to (- for stdout)
--ignore-major-zero Don't treat major version 0 special (use to move from 0.X.Y to 1.0.0)
usage: python -m fragcha changelog [-h] [--version VERSION] [--output OUTPUT] [--append]
options:
-h, --help show this help message and exit
--version VERSION Version number to use in changelog header
--output OUTPUT File append changelog to (- for stdout)
--append Append to output file instead of prepending
Example changelog fragment
Without any extra configuration fragcha will check the .fragcha directory for yml and yaml files to generate a
changelog from. This is an example with all sections that are available by default:
breaking_changes:
- This is a major change, it will cause `fragcha bump` to increase the major version (except when on major version 0)
features:
- This is a minor change, it will cause `fragcha bump` to increase the minor version
bugfixes:
- This is a patch change, it will cause `fragcha bump` to increase the patch version
documentation:
- This is a misc change, it will cause `fragcha bump` to increase the patch version
Example config
The build in defaults are equivalent to this fragcha.json5 being present:
{
"sections": {
"major": {
"breaking_changes": "Breaking Changes"
},
"minor": {
"features": "Features"
},
"patch": {
"bugfixes": "Fixed bugs"
},
"misc": {
"documentation": "Documentation"
}
},
"template": "# {{ version }}\n\
\n\
{%- for section in sections %}\n\
## {{ section.title }}\n\
{%- for change in section['changes'] %}\n\
- {{ change }}\n\
{%- endfor %}\n\
{%- endfor %}\n\
***\n\
"
}