I use preBuildCommands to run simple d program that using results of git commands generates gitinfo.d file with current git commit hash and datetime to include in binary. All works fine but only the second time. The first time preBuildCommands executes and gitinfo.d file is generated as expected and project compiles but linking fails - and only the first time. I suspect it's due to internal structure of dub, but don't know it yet. How can I solve this annoying issue?