From 524e328ff770b2e3ba5794436108385569a05986 Mon Sep 17 00:00:00 2001 From: alessio Date: Sat, 30 Jul 2016 01:15:30 +0200 Subject: [PATCH] bin build option --- realize/config.go | 2 ++ realize/watcher.go | 1 + 2 files changed, 3 insertions(+) diff --git a/realize/config.go b/realize/config.go index 6d602e5..9c152e4 100644 --- a/realize/config.go +++ b/realize/config.go @@ -29,6 +29,7 @@ type Config struct { type Project struct { Name string `yaml:"app_name,omitempty"` Run bool `yaml:"app_run,omitempty"` + Bin bool `yaml:"app_bin,omitempty"` Build bool `yaml:"app_build,omitempty"` Main string `yaml:"app_main,omitempty"` Watcher Watcher `yaml:"app_watcher,omitempty"` @@ -54,6 +55,7 @@ func New(params *cli.Context) *Config{ Main: params.String("main"), Run: params.Bool("run"), Build: params.Bool("build"), + Bin: params.Bool("bin"), Watcher: Watcher{ Paths: []string{ext}, Exts: []string{path}, diff --git a/realize/watcher.go b/realize/watcher.go index ae095fa..9a8cda2 100644 --- a/realize/watcher.go +++ b/realize/watcher.go @@ -12,6 +12,7 @@ func (h *Config) Watch() error{ if err != nil{ panic(err) } + defer watcher.Close() walking := func(path string, info os.FileInfo, err error) error{ if info.IsDir() {