]> git.lizzy.rs Git - cheatdb.git/blob - app/flatpages/help/package_config.md
13db160910e0048f9ec1e3c5245f36f944ab97e6
[cheatdb.git] / app / flatpages / help / package_config.md
1 title: Package Configuration and Releases Guide
2
3 ## Introduction
4
5 ContentDB will read configuration files in your package when doing a number of
6 tasks, including package and release creation.
7 This page details the ways in which you can use this to your advantage.
8
9 ## .conf files
10
11 Every type of content can have a `.conf` file that contains the metadata.
12
13 The filename of the `.conf` file depends on the content type:
14
15 * `mod.conf` for mods.
16 * `modpack.conf` for mod packs.
17 * `game.conf` for games.
18 * `texture_pack.conf` for texture packs.
19
20 The `.conf` uses a key-value format, separated using equals. Here's a simple example:
21
22         name = mymod
23         description = A short description to show in the client.
24
25 ContentDB understands the following information:
26
27 * `description` - A short description to show in the client.
28 * `depends` - Comma-separated hard dependencies.
29 * `optional_depends` - Comma-separated soft dependencies.
30 * `min_minetest_version` - The minimum Minetest version this runs on.
31 * `max_minetest_version` - The maximum Minetest version this runs on.
32
33 and for mods only:
34
35 * `name` - the mod technical name.
36
37 ## Controlling Release Creation
38
39 ### Git Releases and Submodules
40
41 ContentDB can automatically create releases from a git repository.
42 It will include submodules in the resulting archive.
43
44 ### Automatic Release Creation
45
46 The preferred way is to use [webhooks from GitLab or GitHub](/help/release_webhooks/).
47 You can also use the [API](/help/api/) to create releases.
48
49 ### Min and Max Minetest Versions
50
51 When creating a release, the `.conf` file will be read to determine what Minetest
52 versions the release supports. If the `.conf` doesn't specify, then it is assumed
53 that is supports all versions.
54
55 This happens when you create a release via the ContentDB web interface, the
56 [API](/help/api/), or using a [GitLab/GitHub webhook](/help/release_webhooks/).
57
58 ### Excluding files
59
60 When using git to create releases,
61 you can exclude files from a release by using [gitattributes](https://git-scm.com/docs/gitattributes):
62
63
64         .*              export-ignore
65         sources         export-ignore
66         *.zip           export-ignore
67
68
69 This will prevent any files from being included if they:
70
71 * Beginning with `.`
72 * or are named `sources` or are inside any directory named `sources`.
73 * or have an extension of "zip".