mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-23 15:31:26 +00:00
during cleanup we can also remove the routes folder.
This commit is contained in:
committed by
Jeevanandam M
parent
a7b72c9afb
commit
f9ba83270b
@@ -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.
|
dirs := []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)
|
}
|
||||||
if err != nil {
|
|
||||||
fmt.Fprintln(os.Stderr, "Abort:", err)
|
for _, dir := range dirs {
|
||||||
return
|
fmt.Println("Removing:", dir)
|
||||||
|
err = os.RemoveAll(dir)
|
||||||
|
if err != nil {
|
||||||
|
fmt.Fprintln(os.Stderr, "Abort:", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user