Packages
A package is a set of files that Knope releases together with the same version. Knope can increase this version based on changes that affect the package.
A project can either consist of a single package:
Or multiple packages:
versioned_files
The files within a package that contain the current version.
This is an array of strings, each of which is a file path relative to the knope.toml
file.
Each file must have the same version number as all the other files.
Knope determines the type of the file using its name (independent of its path),
so blah/Cargo.toml
is a Cargo.toml
file.
Knope supports the following file names:
Cargo.toml
For versioning Rust projects. Must contain a [package.version]
field, like so:
pyproject.toml
For Python projects using PEP-621 or Poetry.
Must contain either a [project.version]
or [tool.poetry.version]
value, respectively.
If it has both values, they must be the same.
package.json
For JavaScript or TypeScript projects, must contain a root-level version
field:
go.mod
For Go projects using modules. Must contain a module line which must end in the major version for any greater than 1. Can optionally contain a comment containing the full version. If this comment isn’t present, Knope uses the latest matching Git tag to find the version.
pubspec.yaml
For Dart projects, must contain a version
field:
changelog
The relative path to a Markdown file you’d like to add release notes to.
scopes
An array of conventional commit scopes that Knope should consider for the package. If not defined, Knope will consider all scopes. Commits with no scope are always considered.
extra_changelog_sections
An array of objects defining more sections for the changelog (or overrides for the default sections).
Each object can optionally have an array of footers
or an array of types
.
assets
Assets is a list of files to upload to a GitHub release. They do nothing without [GitHub configuration](/reference/Config File/github).
Assets are per-package. Each asset can optionally have a name
, this is what it will appear as in GitHub releases.
The name
defaults to the final part of the path.