Add support for untracked files.

Untracked file glob patterns are stored in the servermeta.json. See the README for detailed information.
This commit is contained in:
Daniel Scalzi
2020-09-12 22:46:50 -04:00
parent 1a19df0e93
commit 24b0923903
14 changed files with 153 additions and 43 deletions

View File

@@ -240,10 +240,51 @@ Represents the additional metadata on the server object (for a YOUR_SERVER). Sam
},
"forge": {
"version": "14.23.5.2854"
}
},
"untrackedFiles": []
}
```
Untracked files is optional. MD5 hashes will not be generated for files matching the provided glob patterns.
```json
{
"untrackedFiles": [
{
"appliesTo": ["files"],
"patterns": [
"config/*.cfg",
"config/**/*.yml"
]
}
]
}
```
In the above example, all files of type `cfg` in the config directory will be untracked. Additionally, all files of type `yml` in the config directory and its subdirectories will be untracked. You can tweak these patterns to fit your needs, this is purely an example. The patterns will only be applied to the folders specified in `appliesTo`. As an example, valid values include `files`, `forgemods`, `libraries`, etc.
```json
{
"untrackedFiles": [
{
"appliesTo": ["files"],
"patterns": [
"config/*.cfg",
"config/**/*.yml"
]
},
{
"appliesTo": ["forgemods", "litemods"],
"patterns": [
"optionalon/*.jar"
]
}
]
}
```
Another example where all `optionalon` forgemods and litemods are untracked. **Untracking mods is NOT recommended. This is an example ONLY.**
[dotenvnpm]: https://www.npmjs.com/package/dotenv
[distro.md]: https://github.com/dscalzi/HeliosLauncher/blob/master/docs/distro.md