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:
parent
ca28e5d77d
commit
d87b7d5e12
@ -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 {
|
||||
|
@ -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>
|
||||
|
||||
|
15
website/static/schema-taskrc.json
Normal file
15
website/static/schema-taskrc.json
Normal 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
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user