Skip to content

Commit

Permalink
Add extensions to watch.trigger
Browse files Browse the repository at this point in the history
Signed-off-by: Joana Hrotko <[email protected]>
  • Loading branch information
jhrotko committed Aug 6, 2024
1 parent bfaf10b commit 2ac541e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2885,6 +2885,7 @@ services:
# sync static content
- path: ./webapp/html
action: sync
x-initialSync: true
target: /var/www
ignore:
- node_modules/
Expand Down Expand Up @@ -2920,6 +2921,9 @@ services:
Action: types.WatchActionSync,
Target: "/var/www",
Ignore: []string{"node_modules/"},
Extensions: types.Extensions{
"x-initialSync": true,
},
},
},
})
Expand Down
4 changes: 3 additions & 1 deletion schema/compose-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,9 @@
"path": {"type": "string"},
"action": {"type": "string", "enum": ["rebuild", "sync", "sync+restart"]},
"target": {"type": "string"}
}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
Expand Down
6 changes: 6 additions & 0 deletions types/derived.gen.go

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

9 changes: 5 additions & 4 deletions types/develop.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ const (
)

type Trigger struct {
Path string `yaml:"path" json:"path"`
Action WatchAction `yaml:"action" json:"action"`
Target string `yaml:"target,omitempty" json:"target,omitempty"`
Ignore []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
Path string `yaml:"path" json:"path"`
Action WatchAction `yaml:"action" json:"action"`
Target string `yaml:"target,omitempty" json:"target,omitempty"`
Ignore []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
}

0 comments on commit 2ac541e

Please sign in to comment.