Nasdaq / semver-git

Gradle plugin that combines git tags and semantic versioning, and sets the gradle version property accordingly.
MIT License
45 stars 15 forks source link

If no annotated version tags exists snapshotSuffix and dirtyMarker are ignored #19

Open deepy opened 6 years ago

deepy commented 6 years ago

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
» git describe --dirty --abbrev=7
fatal: No names found, cannot describe anything.
» echo $?
128
deepy commented 6 years ago

Suggested workaround: push tag 0.0.0 on initial commit.