Added a version file to revel/cmd

Updated import path detection to make it smarter. You can now use absolute paths etc..
This commit is contained in:
NotZippy
2018-09-22 13:37:27 -07:00
parent 69e59efb14
commit 7a4e741d1c
11 changed files with 173 additions and 68 deletions

View File

@@ -45,7 +45,7 @@ func init() {
// Called when unable to parse the command line automatically and assumes an old launch
func updateNewConfig(c *model.CommandConfig, args []string) bool {
c.Index = NEW
c.Index = model.NEW
if len(args) == 0 {
fmt.Fprintf(os.Stderr, cmdNew.Long)
return false
@@ -61,7 +61,6 @@ func updateNewConfig(c *model.CommandConfig, args []string) bool {
// Call to create a new application
func newApp(c *model.CommandConfig) {
// check for proper args by count
c.ImportPath = c.New.ImportPath
c.SkeletonPath = c.New.Skeleton
// Check for an existing folder so we dont clober it
@@ -125,7 +124,6 @@ func newApp(c *model.CommandConfig) {
fmt.Fprintln(os.Stdout, "Your application is ready:\n ", c.AppPath)
// Check to see if it should be run right off
if c.New.Run {
c.Run.ImportPath = c.ImportPath
runApp(c)
} else {
fmt.Fprintln(os.Stdout, "\nYou can run it with:\n revel run -a ", c.ImportPath)