Merge branch 'tyro89-also_remove_routes' into develop

This commit is contained in:
Jeevanandam M
2016-05-21 22:58:30 -07:00

View File

@@ -17,7 +17,7 @@ For example:
revel clean github.com/revel/samples/chat revel clean github.com/revel/samples/chat
It removes the app/tmp directory. It removes the app/tmp and app/routes directory.
`, `,
} }
@@ -37,12 +37,17 @@ func cleanApp(args []string) {
return return
} }
// Remove the app/tmp directory. purgeDirs := []string{
tmpDir := path.Join(appPkg.Dir, "app", "tmp") path.Join(appPkg.Dir, "app", "tmp"),
fmt.Println("Removing:", tmpDir) path.Join(appPkg.Dir, "app", "routes"),
err = os.RemoveAll(tmpDir) }
for _, dir := range purgeDirs {
fmt.Println("Removing:", dir)
err = os.RemoveAll(dir)
if err != nil { if err != nil {
fmt.Fprintln(os.Stderr, "Abort:", err) fmt.Fprintln(os.Stderr, "Abort:", err)
return return
} }
} }
}