dev: run initial build before watch
@@ -106,6 +106,9 @@ func (r *SkaffoldRunner) Run() error {
func (r *SkaffoldRunner) dev() error {
for {
+ if err := r.run(); err != nil {
+ return errors.Wrap(err, "running build and deploy")
+ }
evt, err := r.Watch(r.config.Build.Artifacts, r.watchReady, r.cancel)
if err != nil {
return errors.Wrap(err, "running watch")
@@ -113,9 +116,6 @@ func (r *SkaffoldRunner) dev() error {
if evt.EventType == watch.WatchStop {
return nil
}
- if err := r.run(); err != nil {
- return errors.Wrap(err, "running build and deploy")
- }
}
}
