DFHack / dfhack

Memory hacking library for Dwarf Fortress and a set of tools that use it
Other
1.86k stars 466 forks source link

build - git-describe.h build fails if the local repo has no tags #3794

Open ab9rf opened 11 months ago

ab9rf commented 11 months ago

if the local repo has no tags (which can happen depending on how the repository is forked/cloned), cmake will fail to create git-describe.h which causes subsequent build failures

it would be a good idea to detect this failure in the cmakefile and advise the developer to run git fetch --tags https://github.com/DFHack/dfhack.git to correct the taglessness situation

probably should also advice people to copy tags when forking the github repo

ab9rf commented 11 months ago

@lethosor pointed out on discord that we could alternatively simply have git-describe fall back silently to a "generic" description if git describe fails

myk002 commented 11 months ago

this would also simplify CI a little for the cases where we need a built binary, but we don't care about the version string (e.g. the test builds). fetching tags and complete git history takes up to 30s, which is time we don't need to spend on the test builds.