A script to automatically tag the latest commit on the current branch, with a new Semantic Versioning version number.
It relies upon a .version file being present in the root directory of the repository, containing a Semantic Versioning version number in the format: v1.0.x, in which the major and minor version numbers are set, and the patch version number is ignored (this is automatically set).
If the repository's last tagged commit has the same major and minor version numbers as those in the .version file, then the patch version number is incremented and this forms the version number to be used as the tag for the new commit. If the major or minor numbers are different, or if there are no previous version tags on any commits in the repository, then the patch number is set to 0.