PrepareRelease
This step:
- Looks through all commits since the last version tags and parses any Conventional Commits it finds.
- Reads any Changesets in the
.changeset
folder (which you can create viaCreateChangeFile
). Knope deletes those files after reading them. - Bumps the semantic version of any packages that have changed.
- Adds a new entry to any affected changelog files.
- Stages all files modified by this step with Git (effectively,
git add <file>
for versioned files, changelogs, and changesets). This step doesn’t commit the changes.
When multiple packages are configured—PrepareRelease
runs for each package independently. The version tag for that package will be the starting point.
Options
allow_empty
: If set totrue
, this step won’t fail if there are no changes to release. Defaults tofalse
.prerelease_label
: If set, this step will create a pre-release version using the specified label. This can also be set dynamically using the--prerelease-label
command line argument.- The
--override-version
command line argument can use used to override the version calculated by this step. ignore_conventional_commits
: If set totrue
, this step won’t look for Conventional Commits (will only consider changesets). Defaults tofalse
.
Errors
The reasons this can fail:
- Knope couldn’t bump the version.
- The packages section isn’t configured correctly.
- There was nothing to release and
allow_empty
wasn’t set totrue
. In this case it exits immediately so that there aren’t problems with later steps.