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       --help[=FMT] (default=auto)
50           Show this help in format FMT. The value FMT must be one of `auto',
51           `pager', `groff' or `plain'. With `auto', the format is `pager` or
52           `plain' whenever the TERM env var is `dumb' or undefined.
53
54       --version
55           Show version information.
56

COMMON OPTIONS

58       These options are common to all commands.
59

MORE HELP

61       Use `dune COMMAND --help' for help on a single command.
62

BUGS

64       Check bug reports at https://github.com/ocaml/dune/issues
65
66
67
68Dune 11VERSION11                                                 dune-subst(1)
Impressum