Revel tool enhancements

* run Command will choose CWD if no additional arguments are supplied
* Added Revel version check, compatible lists are in model/version
This commit is contained in:
NotZippy
2018-10-10 20:53:23 -07:00
parent 031fde6009
commit 8c21a56302
8 changed files with 236 additions and 35 deletions

View File

@@ -12,6 +12,7 @@ import (
"github.com/revel/cmd/model"
"github.com/revel/cmd/utils"
"go/build"
"os"
)
var cmdRun = &Command{
@@ -108,7 +109,8 @@ func updateRunConfig(c *model.CommandConfig, args []string) bool {
c.Run.Mode = args[0]
}
case 0:
return false
// Attempt to set the import path to the current working director.
c.Run.ImportPath,_ = os.Getwd()
}
c.Index = model.RUN
return true