Tag the Next Semantic Version¶
Let nsv tag your repository with the next calculated semantic version:
An annotated tag will be created with the default commit message of chore: tagged release <version>.
If you want to see what is happening under the hood:
0.2.0
┌───────────────┬──────────────────────────────────────────────────┐
│  0.2.0        │ > e0ba951                                        │
│  ↑↑           │   docs: document new exciting feature            │
│  0.1.0        │                                                  │
│               │ ✓ 2020953                                        │
│               │   >>feat<<: a new exciting feature               │
│               │                                                  │
│               │ > 709a467                                        │
│               │   ci: add github workflows                       │
└───────────────┴──────────────────────────────────────────────────┘
Configurable paths for monorepo support¶
Monorepo support is important to the design of nsv. By adding support for context paths, multiple semantic versions can be resolved and tagged as a single operation within a repository.
Any version change will be printed to stdout as a comma separated list in context path order:
Using a custom tag message¶
If you are not happy with the tag message, you can change it. Support for Go templating provides extra customization.
Resulting in a tag message of:
Signing your commit or tag¶
If you require GPG signing, you can configure it here.
Version template customization¶
Internally nsv utilizes a go template when constructing the next semantic version. Runtime customization of this template is available here.
Executing a custom hook¶
Before tagging your repository, nsv can execute a custom hook. If changes are detected, it will commit them, and then this new commit is tagged.
It uses the default commit message of chore: patched files for release <version> [skip ci].
Using a custom commit message¶
You can change the commit message. Support for Go templating provides extra customization.
Resulting in a commit message of:
Skip changes during a dry run¶
Run nsv within dry-run mode to skip tagging your repository and revert any changes a hook makes. This is perfect for testing.