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 [--build-info] [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 --abbrev=7
21
22       dune subst substitutes the variables that topkg substitutes with the
23       default configuration:
24       - %%NAME%%, the name of the project (from the dune-project file)
25       - %%VERSION%%, output of git describe --always --dirty --abbrev=7
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

COMMON OPTIONS

53       These options are common to all commands.
54
55       --debug-backtraces
56           Always print exception backtraces.
57
58       --help[=FMT] (default=auto)
59           Show this help in format FMT. The value FMT must be one of auto,
60           pager, groff or plain. With auto, the format is pager or plain
61           whenever the TERM env var is dumb or undefined.
62
63       --version
64           Show version information.
65

MORE HELP

67       Use `dune COMMAND --help' for help on a single command.
68

EXIT STATUS

70       subst exits with the following status:
71
72       0   on success.
73
74       1   if an error happened.
75
76       130 if it was interrupted by a signal.
77

BUGS

79       Check bug reports at https://github.com/ocaml/dune/issues
80

SEE ALSO

82       dune(1)
83
84
85
86Dune n/a                                                         DUNE-SUBST(1)
Impressum