mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-23 07:21:28 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user