mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
7b25a42970
Always generate the version through git when possible, and encode that within the binaries so that `catala --version` does'nt give misleading information. Previously we used dune's builtin functionality, but that resorts to a hack at install time which is unpleasant and doesn't work with our use of `opam install`. The cost is a re-linking of catala_utils and the binaries upon git commit, which is hardly noticeable.
25 lines
444 B
Plaintext
25 lines
444 B
Plaintext
(library
|
|
(name catala_utils)
|
|
(public_name catala.catala_utils)
|
|
(modules
|
|
(:standard \ get_version))
|
|
(libraries unix cmdliner ubase ocolor re bindlib catala.runtime_ocaml))
|
|
|
|
(executable
|
|
(name get_version)
|
|
(modules get_version)
|
|
(libraries unix))
|
|
|
|
(documentation
|
|
(package catala)
|
|
(mld_files catala_utils))
|
|
|
|
(rule
|
|
(deps
|
|
(universe)
|
|
(env_var CATALA_VERSION))
|
|
(action
|
|
(with-stdout-to
|
|
version.ml
|
|
(run %{exe:get_version.exe}))))
|