Dune subst in parent git repo

I’m packaging some opam packages for alpine linux, which tracks build scripts in one big repo. Running dune build -p <package> and dune install <package> --destdir=<pkgdir> after fetching a release tarball inside the aports tree ends up erroneously filling the META files with the output of git describe --always --dirty for the aports repo. Is there any way to change this behavior? As a temporary hack I’ve just been patching the META files by hand. I see this came up once before already.


Hi! You can find a description of how dune sets the version in META file in this PR. I think the right solution in that case would be to set a in the corresponding opam file or in the dune-project file.

Syntax for opam files:

version: 1.2.3

Syntax for dune-project:

(version 1.2.3)