The issue you are experiencing is related to the different versions of Git installed on the different environments. The git describe command behaves differently in each version, resulting in different output.
On the GitHub runner, which has Git version 2.41.0, the git describe command omits the prefix “v” and the trailing commit count when there are no tags matching the specified pattern. This is why you are getting 26888c7 as the output.
To have consistent output across all environments, you can modify your command to include the prefix “v” and the trailing commit count manually. Here’s the modified command:
This command uses the --long and --tags options to include the commit count and tags in the output. The sed command is used to remove the prefix “v” and modify the commit count format.
Executing this modified command should give you the expected output v33.4.0-5-g26888c7 across all environments.