Skip to content

Commit b1a5a9e

Browse files
committed
Add section on modifying source archives to "Creating releases"
Closes gh-12796
1 parent 0a61228 commit b1a5a9e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

docs/markdown/Creating-releases.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,21 @@ for example when done in CI that already does its own testing.
5151
So with `--no-tests` you can tell Meson "Do not build and test generated
5252
packages.".
5353

54+
## Modifying release archive contents
55+
56+
By default `meson dist` includes all source code under version control. In
57+
order to exclude tracked files, include uncommitted files, or modify existing
58+
files, dist scripts can be used with [[meson.add_dist_script]]. For example:
59+
60+
```meson
61+
meson.add_dist_script('gen_somefile.py')
62+
```
63+
64+
Dist scripts work for any supported VCS. In addition, if Git is used as the
65+
VCS, a `.gitattributes` file can be used to ignore or modify files during
66+
archive creation via using the `export-ignore` and `export-subst` attributes
67+
for files or directories.
68+
5469
## Use `--allow-dirty` to override error when git repository contains uncommitted changes
5570

5671
*Since 0.62.0* Instead of emitting a warning when a repository contains

0 commit comments

Comments
 (0)