github.com/tilt-dev/tilt@v0.33.15-0.20240515162809-0a22ed45d8a0/internal/store/mode.go (about) 1 package store 2 3 // Defines different executions modes for running Tilt, 4 // and deciding when to exit. 5 type EngineMode struct { 6 Name string 7 } 8 9 var ( 10 // EngineModeUp is an interactive dev mode that watches files and resources. 11 EngineModeUp = EngineMode{} 12 13 // EngineModeCI is a mode that builds and applies all resources, 14 // waits until they come up, then exits. 15 EngineModeCI = EngineMode{Name: "ci"} 16 ) 17 18 func (m EngineMode) WatchesFiles() bool { 19 return m == EngineModeUp 20 } 21 22 func (m EngineMode) WatchesRuntime() bool { 23 return m == EngineModeUp || m == EngineModeCI 24 } 25 26 func (m EngineMode) IsCIMode() bool { 27 return m == EngineModeCI 28 }