This is also an issue if the closest annotated tag is not a semantic version.
Now if git describe only provided SEPARATE exit codes handling this would be easier.
» git describe --dirty --abbrev=7
fatal: No annotated tags can describe '8a999efb9f35b68d9bf36bcb10d4583fcceb6ef9'.
However, there were unannotated tags: try --tags.
» echo $?
128
This is also an issue if the closest annotated tag is not a semantic version.
Now if
git describe
only provided SEPARATE exit codes handling this would be easier.