Polybar picks up wrong version number when release tarball is built under foreign repo
envgap__polybar__polybar-3152
01 / FAILURE SIGNATURE
As reported upstream
No identifying execution failure has been captured.
Not a benchmark task.
- In a clean container the reported failure did not reproduce, or the known fix did not make the project run.
02 / ENVIRONMENT RECIPE
- Base commit
e7cf47de71a7ceaf31c2093a959ba4aa08ec96a7- Manifest
CMakeLists.txt- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
polybar/polybar #3152 · read the original issue
### Steps to reproduce 1. Download a [polybar release](https://github.com/polybar/polybar/releases) 2. Extract it in a nested folder of *another* git repo (that repo has to have at least one tag on the current branch) 3. Build polybar regularly ### Expected behavior Since polybar is not built from its git repo, it should extract the version information from the `version.txt` file ### Actual behavior The `git describe ...` command used to determine the version (and whether we are in a git repo) picks up the version tag from the parent repo instead. ### Additional Context / Screenshots The top-level `CMakeLists.txt` should additionally check that the top-level git directory matches the top-level cmake directory. This way, we only use git to determine the version if the source code is in the top-level of the repo. This still may get "wrong" results if someone is just putting the polybar sources at the top of some other repo. But that case is not distinguishable from polybar forks anyway and is acceptable. **PRs are welcome**
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]