1dune-subst(1)                     Dune Manual                    dune-subst(1)
2
3
4

NAME

6       dune-subst - Substitute watermarks in source files.
7

SYNOPSIS

9       dune subst [OPTION]...
10

DESCRIPTION

12       Substitute %%ID%% strings in source files, in a similar fashion to what
13       topkg does in the default configuration.
14
15       This command is only meant to be called when a user pins a package to
16       its development version. Especially it replaces %%VERSION%% strings by
17       the version obtained from the vcs. Currently only git is supported and
18       the version is obtained from the output of:
19
20         $ git describe --always --dirty
21
22       dune subst substitutes the variables that topkg substitutes with the
23       defatult configuration:
24       - %%NAME%%, the name of the project (from the dune-project file)
25       - %%VERSION%%, output of git describe --always --dirty
26       - %%VERSION_NUM%%, same as %%VERSION%% but with a potential leading 'v'
27       or 'V' dropped
28       - %%VCS_COMMIT_ID%%, commit hash from the vcs
29       - %%PKG_MAINTAINER%%, contents of the maintainer: field from the opam
30       file
31       - %%PKG_AUTHORS%%, contents of the authors: field from the opam file
32       - %%PKG_HOMEPAGE%%, contents of the homepage: field from the opam file
33       - %%PKG_ISSUES%%, contents of the issues: field from the opam file
34       - %%PKG_DOC%%, contents of the doc: field from the opam file
35       - %%PKG_LICENSE%%, contents of the license: field from the opam file
36       - %%PKG_REPO%%, contents of the repo: field from the opam file
37
38       In order to call dune subst when your package is pinned, add this line
39       to the build: field of your opam file:
40
41         [dune "subst"] {pinned}
42
43       Note that this command is meant to be called only from opam files and
44       behaves a bit differently from other dune commands. In particular it
45       doesn't try to detect the root and must be called from the root of the
46       project.
47

OPTIONS

49       --build-info
50           Show build information.
51
52       --help[=FMT] (default=auto)
53           Show this help in format FMT. The value FMT must be one of `auto',
54           `pager', `groff' or `plain'. With `auto', the format is `pager` or
55           `plain' whenever the TERM env var is `dumb' or undefined.
56
57       --version
58           Show version information.
59

COMMON OPTIONS

61       These options are common to all commands.
62

MORE HELP

64       Use `dune COMMAND --help' for help on a single command.
65

BUGS

67       Check bug reports at https://github.com/ocaml/dune/issues
68
69
70
71Dune n/a                                                         dune-subst(1)
Impressum