devkitPro / 3ds-hbmenu

The 3DS Homebrew Menu (∩ ͡° ͜ʖ ͡°)⊃━☆゚
705 stars 73 forks source link

Add --tags to non-release VERSTRING in Makefile #95

Closed vaguerant closed 4 months ago

vaguerant commented 5 months ago

As you've possibly noticed from the latest release build, the version string is a somewhat confusing 2.4.2-v2.4.1-4-gc63d531. This is pulled from a git describe --dirty --always in the Makefile. git describe will by default only check annotated tags. There's a long explanation of this behavior on StackOverflow for anybody who's interested.

The latest tag as of this PR is v2.4.2 but the latest annotated tag is v2.4.1. As such, git describe is picking up the wrong tag when building non-release versions.

For reference, here's me just running git describe from terminal, with and without the --tags argument:

# git describe --tags
v2.4.2-1-gc63d531
# git describe
v2.4.1-4-gc63d531

Adding --tags to the Makefile allows the correct tag to be picked up, whether or not it's an annotated tag. An alternative to accepting this PR would be to exclusively use annotated tags in future, so that they are always picked up by git describe.