Configuration

Up a Level

Configuration is done through a `//.config/mfgames-conventional-commit.json` file where `//` means the Git root of a project.

Schema

This system uses the schema to determine the version of the file. Right now, there is only a `v0` version

Package

The core of the configuration is how to deal with a single package. This is a specification that is used in multiple places, but generally looks like this:

All of these properties are optional.

tag_prefix

The tag prefix is a prefix to any Git tag to determine the version. The default is ā€œvā€ which would mean version 1.0.0 would have a Git tag of `v1.0.0`.

directories.include

This is used to determine what package a user is referencing to when they don't use `--all` or `--package package-name` in the parameters. This is relative to the project root. If multiple packages match a given path, then there will be an error. The same if no package matches the current working directory.

files.include

This is a list of globs (uses `**` for any matching across directories and `*` for a single file) that the system uses to determine if a file is in a specific module. This can overlap with other packages and it can contain multiple matches.

The glob was used so you could only match even specific files (`**/*.rs`) if you want.

files.exclude

This is the list of exclusions to the `files.include` configuration above.

updates

Updates is a list of commands to use with the update[1] command. Every property except `script` is optional and each entry looks like this:

1: ./update/

update.script

The shell script to run on the update. The following will be substituted with dynamic values.

update.always_run

If this is true, then the update will run every time with the `mfgames-conventional-commit update` command is run for that package. This defaults to `false`.

Substitutions

In all of these properties, `{package}` will be substituted with the name of the package (see below). So, `{ "directories": { "include": [ "src/{package}/**/*" ]}}` will replace `{package}` with the name of the package.

Packages

The `packages` property is a dictionary/map of package names to package details above.

Defaults

If you notice that the two packages in the above example have the same values (they originally didn't before `{package}` became a thing). The `defaults` property can be used to set them and simplify the configuration.

If a package contains a value, it will override the defaults.

Missing Defaults

If there are no defaults, the following is used:

Missing Entries

If the configuration file is missing, then the following is used:

Footer

Below are various useful links within this site and to related sites (not all have been converted over to Gemini).

Categories

D. Moonfire

Fedran

The Moonfires

HTML