Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3050,7 +3050,7 @@ services:
# sync static content
- path: ./webapp/html
action: sync
x-initialSync: true
initial_sync: true
target: /var/www
ignore:
- node_modules/
Expand Down Expand Up @@ -3082,13 +3082,11 @@ services:
assert.DeepEqual(t, *frontend.Develop, types.DevelopConfig{
Watch: []types.Trigger{
{
Path: "./webapp/html",
Action: types.WatchActionSync,
Target: "/var/www",
Ignore: []string{"node_modules/"},
Extensions: types.Extensions{
"x-initialSync": true,
},
Path: "./webapp/html",
Action: types.WatchActionSync,
Target: "/var/www",
Ignore: []string{"node_modules/"},
InitialSync: true,
},
},
})
Expand Down
4 changes: 4 additions & 0 deletions schema/compose-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,10 @@
"exec": {
"$ref": "#/definitions/service_hook",
"description": "Command to execute when a change is detected and action is sync+exec."
},
"initial_sync": {
"type": "boolean",
"description": "Ensure that an initial synchronization is done before starting watch mode for sync+x triggers"
}
},
"additionalProperties": false,
Expand Down
1 change: 1 addition & 0 deletions types/derived.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 8 additions & 7 deletions types/develop.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ const (
)

type Trigger struct {
Path string `yaml:"path" json:"path"`
Action WatchAction `yaml:"action" json:"action"`
Target string `yaml:"target,omitempty" json:"target,omitempty"`
Exec ServiceHook `yaml:"exec,omitempty" json:"exec,omitempty"`
Include []string `yaml:"include,omitempty" json:"include,omitempty"`
Ignore []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
Path string `yaml:"path" json:"path"`
Action WatchAction `yaml:"action" json:"action"`
Target string `yaml:"target,omitempty" json:"target,omitempty"`
Exec ServiceHook `yaml:"exec,omitempty" json:"exec,omitempty"`
Include []string `yaml:"include,omitempty" json:"include,omitempty"`
Ignore []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
InitialSync bool `yaml:"initial_sync,omitempty" json:"initial_sync,omitempty"`
Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
}
Loading