Query: Is there a way to automatically increase the version in a script message? I need my release message to always be one version higher than the previous.
Aim: For example, if I have version **0.1.2**, I would like to update my commit message to 0.1.3 before releasing it. While I can manually adjust it each time, I'm looking for advice on automating this process.
{
"version": "0.1.2",
"scripts": {
"release": "git commit --allow-empty -m \\\"chore: release 0.1.2\\\"",
What is the most efficient method to extract and increment the current version, then use it in the release script as desired?
"scripts": {
"release": "git commit --allow-empty -m {expression}",