bin build option

This commit is contained in:
alessio 2016-07-30 01:15:30 +02:00
parent 50f25fdb06
commit 524e328ff7
2 changed files with 3 additions and 0 deletions

View File

@ -29,6 +29,7 @@ type Config struct {
type Project struct { type Project struct {
Name string `yaml:"app_name,omitempty"` Name string `yaml:"app_name,omitempty"`
Run bool `yaml:"app_run,omitempty"` Run bool `yaml:"app_run,omitempty"`
Bin bool `yaml:"app_bin,omitempty"`
Build bool `yaml:"app_build,omitempty"` Build bool `yaml:"app_build,omitempty"`
Main string `yaml:"app_main,omitempty"` Main string `yaml:"app_main,omitempty"`
Watcher Watcher `yaml:"app_watcher,omitempty"` Watcher Watcher `yaml:"app_watcher,omitempty"`
@ -54,6 +55,7 @@ func New(params *cli.Context) *Config{
Main: params.String("main"), Main: params.String("main"),
Run: params.Bool("run"), Run: params.Bool("run"),
Build: params.Bool("build"), Build: params.Bool("build"),
Bin: params.Bool("bin"),
Watcher: Watcher{ Watcher: Watcher{
Paths: []string{ext}, Paths: []string{ext},
Exts: []string{path}, Exts: []string{path},

View File

@ -12,6 +12,7 @@ func (h *Config) Watch() error{
if err != nil{ if err != nil{
panic(err) panic(err)
} }
defer watcher.Close()
walking := func(path string, info os.FileInfo, err error) error{ walking := func(path string, info os.FileInfo, err error) error{
if info.IsDir() { if info.IsDir() {