gitversion

Generate semantic version numbers automatically from Git history

brewmacoslinux
Try with needOr install directly
Source

About

Easy semantic versioning for projects using Git

Commands

gitversion

Examples

Display the semantic version of the current repository$ gitversion
Show version information in JSON format for scripting$ gitversion /output json
Generate version for a specific branch or commit$ gitversion /targetbranch main