Skip to content

Patch files with the next semantic version

experimental

Let nsv patch files in your repository with the next calculated semantic version by executing a custom hook:

NSV_HOOK="./scripts/patch.sh" nsv patch
nsv patch --hook "./scripts/patch.sh"

Any file changes are committed with the default message chore: patched files for release <version>.

Auto-patching is on the horizon.

Soon, nsv will recognize standard project files and automatically patch them with the next semantic version. How cool is that!

Signing your commit

If you require GPG signing, you can configure it here.

Using a custom commit message

You can change the commit message. Support for Go templating provides extra customization.

NSV_COMMIT_MESSAGE="chore: bumped files to {{.Tag}}" nsv patch
nsv patch --commit-message "chore: bumped files to {{.Tag}}"

Resulting in a commit message of:

chore: bumped files to 0.2.0

Version template customization

Internally, nsv utilizes a go template to construct the next semantic version. Runtime customization of this template is available here.