1
0
mirror of https://github.com/go-task/task.git synced 2025-01-20 04:59:37 +02:00

update docs and add json schema

This commit is contained in:
Valentin Maerten 2025-01-02 20:40:00 +01:00
parent ca28e5d77d
commit d87b7d5e12
No known key found for this signature in database
GPG Key ID: 2F8E54DDF815C341
3 changed files with 21 additions and 5 deletions

View File

@ -20,12 +20,12 @@ import (
const envPrefix = "TASK_X_"
var defaultConfigFilenames = []string{
".task-experiments.yml",
".task-experiments.yaml",
".taskrc.yml",
".taskrc.yaml",
}
type ExperimentConfigFile struct {
Experiments map[string]string `yaml:",inline"`
Experiments map[string]string `yaml:"experiments"`
}
type Experiment struct {

View File

@ -65,8 +65,9 @@ Which method you use depends on how you intend to use the experiment:
<Tabs values={[ {label: '.task-experiments.yml', value: 'yaml'}, {label: '.env', value: 'env'}]}>
<TabItem value="yaml">
```yaml title=".task-experiments.yml"
X_FEATURE: 1
```yaml title=".taskrc.yml"
experiments:
FEATURE: 1
```
</TabItem>

View File

@ -0,0 +1,15 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"title": "Taskrc YAML Schema",
"description": "Schema for .taskrc files.",
"type": "object",
"properties": {
"experiments": {
"type": "object",
"additionalProperties": {
"type": "integer"
}
}
},
"additionalProperties": false
}