-
Couldn't load subscription status.
- Fork 22
Description
Steps to reproduce:
I was trying to package the air cli for Archlinux using a PKGBUILD file.
This process has a convention to create a package named air-git to check out the latest code and build it.
It still needs a version number though, and a common way to achieve this is using git describe to find the latest annotated tag (i.e. x.z.y) and add the count of commits since then and a commit hash (i.e. x.y.z-n-h). This allows for semver ordering.
I discovered that the air does not use annotated tags and I ran into this git describe behavior from man git tag
Annotated tags are meant for release while lightweight tags are meant for private or temporary object labels. For this reason, some git commands for naming objects (like git describe) will ignore lightweight tags by default.
Undeterred, I changed to using git describe --tags which also includes non-annotated tags, but that yields 0.1.2-189-gd48bad1 far away from the current release 0.7.1. That is because the 0.7.1 tag (and other release tags) does not point to a commit that is part of any branch, which seem odd. See also the warning displayed at https://github.com/posit-dev/air/tree/0.7.1
My expectation would have been for a release tag to point to a commit on main or at least to a commit on a release branch. It makes it a bit difficult otherwise to differentiate a rogue release from a regular one.
Is this behavior on purpose or is that something you'd be interested in changing (or rather, accept a PR for) so that I don't have to manually do a version bump ?