compile: Handle both kinds of git tags (lightweight and annotated)