Skip to content

Commit

Permalink
introduce sync+exec watch action
Browse files Browse the repository at this point in the history
Signed-off-by: Nicolas De Loof <[email protected]>
  • Loading branch information
ndeloof committed Nov 27, 2024
1 parent df253f2 commit d271536
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
11 changes: 9 additions & 2 deletions schema/compose-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,15 @@
"properties": {
"ignore": {"type": "array", "items": {"type": "string"}},
"path": {"type": "string"},
"action": {"type": "string", "enum": ["rebuild", "sync", "sync+restart"]},
"target": {"type": "string"}
"action": {"type": "string", "enum": ["rebuild", "sync", "sync+restart", "sync+exec"]},
"target": {"type": "string"},
"command": {
"oneOf": [
{"type": "null"},
{"type": "string"},
{"type": "array","items": {"type": "string"}}
]
}
},
"additionalProperties": false,
"patternProperties": {"^x-": {}}
Expand Down
12 changes: 7 additions & 5 deletions types/develop.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,14 @@ const (
WatchActionSync WatchAction = "sync"
WatchActionRebuild WatchAction = "rebuild"
WatchActionSyncRestart WatchAction = "sync+restart"
WatchActionSyncExec WatchAction = "sync+exec"
)

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"`
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"`
Command ShellCommand `yaml:"command,omitempty" json:"command"`
Ignore []string `yaml:"ignore,omitempty" json:"ignore,omitempty"`
Extensions Extensions `yaml:"#extensions,inline,omitempty" json:"-"`
}

0 comments on commit d271536

Please sign in to comment.