Go to file
2023-10-30 12:02:48 +00:00
.gitlab-ci.yml Update .gitlab-ci.yml file 2023-10-30 12:02:48 +00:00
calculate-version.sh iniitalize script 2023-06-05 14:55:19 +02:00
LICENSE Add LICENSE 2023-06-05 12:52:56 +00:00
README.md update readme 2023-06-05 15:10:52 +02:00

Git SemVer Compute

A simple script to use in your projects to calculcate a SemVer compliant verion identifier based on Git Tags and Commits.

Dependencies

  • git
  • bash
  • perl

How it Works

Rewinds the commits in the git tree to find one with a tag that is a valid Semantic Version. If none is found, the version 0.0.0 is used. If the tag is not found on the current commit then metadata will be added to the version indicating how many additional commits have been added since the tag along with a short commit hash. Additionally, if there are any uncommited changes in tracked files, the diff will be hashed and added to the metadata.

Tags which begin with a 'v' will have it removed when evaluating the tag as a version.