gbdev / rgbds

Rednex Game Boy Development System - An assembly toolchain for the Nintendo Game Boy and Game Boy Color
https://rgbds.gbdev.io
MIT License
1.33k stars 175 forks source link

Declared version can be affected by another Git repository #1288

Closed Rangi42 closed 7 months ago

Rangi42 commented 8 months ago

If you download GitHub's .zip file and extract it in the presence of another Git repository, that repo's tags can influence the declared version of RGBDS when you build it.

I would call this an edge case not worth handling, except that it actually happened--someone built RGBDS inside my project, and then rgbasm -V would print rgbasm v3.0.0-beta-dirty.

We could check the repository's identity as well as its tags. If git config --get remote.origin.url ends with /rgbds.git, that might be a reliable check.

ISSOtm commented 8 months ago

What we really want is to pass --git-dir to git.