fix(build): git describe all tagged versions (#5447)

Previously, the version string would include `v2022.4-N-...` indicating N commits since the last annotated tag (`v2022.4`).

This change broadens the search from just annotated tags to all tags that match `v*`, including the latest version `v2023.4.rc2`.

See also: https://github.com/KhronosGroup/SPIRV-Tools/pull/5417#issuecomment-1764772856
This commit is contained in:
sethp 2023-11-13 08:28:30 -08:00 committed by GitHub
parent 6b1e609ef1
commit d88742fbd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -111,7 +111,7 @@ def describe(repo_path):
# if we're in a git repository, attempt to extract version info
success, output = command_output(["git", "rev-parse", "--show-toplevel"], repo_path)
if success:
success, output = command_output(["git", "describe"], repo_path)
success, output = command_output(["git", "describe", "--tags", "--match=v*", "--long"], repo_path)
if not success:
success, output = command_output(["git", "rev-parse", "HEAD"], repo_path)