gitonomy/gitlib

How to get the most recent tag?

Closed this issue · 3 comments

How to get the most recent tag?

No sorry, I was, maybe, not clear. The question would be: How to get the latest tag from a Git repository using gitonomy/gitlib

Oh, sorry :-( I apologize for the confusion. This question is legit for gitlib.

There's no automated method for this. There are multiple ways of implementing it:

  • Compare names with semver
  • Compare commit dates associated to tags ($tag->getCommit()->getCommitterDate())