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

@@ -36,7 +36,7 @@ func init() {
// Update the clean command configuration, using old method
func updateCleanConfig(c *model.CommandConfig, args []string) bool {
c.Index = CLEAN
c.Index = model.CLEAN
if len(args) == 0 {
fmt.Fprintf(os.Stderr, cmdClean.Long)
return false
@@ -47,8 +47,6 @@ func updateCleanConfig(c *model.CommandConfig, args []string) bool {
// Clean the source directory of generated files
func cleanApp(c *model.CommandConfig) {
c.ImportPath = c.Clean.ImportPath
appPkg, err := build.Import(c.ImportPath, "", build.FindOnly)
if err != nil {
utils.Logger.Fatal("Abort: Failed to find import path:", "error", err)