Fix Makefile to avoid git describe error in CI #8513
+1
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Addressed
Fixes the error
fatal: No names found, cannot describe anything.that occurs when runningmakecommands in CI (GitHub Actions).
https://github.com/sigp/lighthouse/actions/runs/19839541042/job/56844781126#step:5:13
Proposed Changes
Changed the
GIT_TAGvariable assignment in the Makefile from immediate evaluation to lazy evaluation:This change ensures that git describe is only executed when
GIT_TAGis actually used (in thebuild-release-tarballstarget), rather than on every Makefile invocation.Additional Info
Root cause:
:=(simple expansion) caused git describe to execute immediately whenthe Makefile was loaded, even for targets that don't use
GIT_TAG(e.g., make install, make test)