Skip to content

Commit 2ac541e

Browse files
committed
Add extensions to watch.trigger
Signed-off-by: Joana Hrotko <[email protected]>
1 parent bfaf10b commit 2ac541e

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

loader/loader_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2885,6 +2885,7 @@ services:
28852885
# sync static content
28862886
- path: ./webapp/html
28872887
action: sync
2888+
x-initialSync: true
28882889
target: /var/www
28892890
ignore:
28902891
- node_modules/
@@ -2920,6 +2921,9 @@ services:
29202921
Action: types.WatchActionSync,
29212922
Target: "/var/www",
29222923
Ignore: []string{"node_modules/"},
2924+
Extensions: types.Extensions{
2925+
"x-initialSync": true,
2926+
},
29232927
},
29242928
},
29252929
})

schema/compose-spec.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,9 @@
480480
"path": {"type": "string"},
481481
"action": {"type": "string", "enum": ["rebuild", "sync", "sync+restart"]},
482482
"target": {"type": "string"}
483-
}
483+
},
484+
"additionalProperties": false,
485+
"patternProperties": {"^x-": {}}
484486
},
485487
"additionalProperties": false,
486488
"patternProperties": {"^x-": {}}

types/derived.gen.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

types/develop.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ const (
3131
)
3232

3333
type Trigger struct {
34-
Path string `yaml:"path" json:"path"`
35-
Action WatchAction `yaml:"action" json:"action"`
36-
Target string `yaml:"target,omitempty" json:"target,omitempty"`
37-
Ignore []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
34+
Path string `yaml:"path" json:"path"`
35+
Action WatchAction `yaml:"action" json:"action"`
36+
Target string `yaml:"target,omitempty" json:"target,omitempty"`
37+
Ignore []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
38+
Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
3839
}

0 commit comments

Comments
 (0)