@@ -15,7 +15,7 @@ import (
1515)
1616
1717const (
18- version = "1.5.1r2 "
18+ version = "1.5.2 "
1919)
2020
2121// New realize instance
@@ -35,26 +35,16 @@ type realize struct {
3535// Cli commands
3636func main () {
3737 app := & cli.App {
38- Name : "Realize" ,
39- Version : version ,
40- Authors : []* cli.Author {
41- {
42- Name : "Alessio Pracchia" ,
43- Email : "pracchia@hastega.it" ,
44- },
45- {
46- Name : "Daniele Conventi" ,
47- Email : "conventi@hastega.it" ,
48- },
49- },
38+ Name : "Realize" ,
39+ Version : version ,
5040 Description : "Go build system with file watchers, output streams and live reload. Run, build and watch file changes with custom paths" ,
5141 Commands : []* cli.Command {
5242 {
5343 Name : "start" ,
54- Aliases : []string {"r " },
44+ Aliases : []string {"s " },
5545 Description : "Start a toolchain on a project or a list of projects. If not exist a config file it creates a new one" ,
5646 Flags : []cli.Flag {
57- & cli.StringFlag {Name : "path" , Aliases : []string {"p" }, Value : wdir () , Usage : "Project base path" },
47+ & cli.StringFlag {Name : "path" , Aliases : []string {"p" }, Value : "." , Usage : "Project base path" },
5848 & cli.StringFlag {Name : "name" , Aliases : []string {"n" }, Value : "" , Usage : "Run a project by its name" },
5949 & cli.BoolFlag {Name : "fmt" , Aliases : []string {"f" }, Value : false , Usage : "Enable go fmt" },
6050 & cli.BoolFlag {Name : "vet" , Aliases : []string {"v" }, Value : false , Usage : "Enable go vet" },
@@ -172,7 +162,7 @@ func main() {
172162 if err != nil {
173163 return d .Err ()
174164 }
175- r .Settings .FileLimit = val
165+ r .Settings .FileLimit = int32 ( val )
176166 return nil
177167 },
178168 },
@@ -1217,11 +1207,11 @@ func prefix(s string) string {
12171207 if s != "" {
12181208 return fmt .Sprint (yellow .bold ("[" ), "REALIZE" , yellow .bold ("]" ), " : " , s )
12191209 }
1220- return ""
1210+ return s
12211211}
12221212
12231213// Before is launched before each command
1224- func before (* cli.Context ) error {
1214+ func before (* cli.Context ) ( err error ) {
12251215 // custom log
12261216 log .SetFlags (0 )
12271217 log .SetOutput (logWriter {})
@@ -1230,7 +1220,7 @@ func before(*cli.Context) error {
12301220 if gopath == "" {
12311221 return errors .New ("$GOPATH isn't set properly" )
12321222 }
1233- if err : = os .Setenv ("GOPATH" , gopath ); err != nil {
1223+ if err = os .Setenv ("GOPATH" , gopath ); err != nil {
12341224 return err
12351225 }
12361226 // new realize instance
@@ -1239,11 +1229,11 @@ func before(*cli.Context) error {
12391229 r .Settings .read (& r )
12401230 // increase the file limit
12411231 if r .Settings .FileLimit != 0 {
1242- if err : = r .Settings .flimit (); err != nil {
1232+ if err = r .Settings .flimit (); err != nil {
12431233 return err
12441234 }
12451235 }
1246- return nil
1236+ return
12471237}
12481238
12491239// Rewrite the layout of the log timestamp
0 commit comments