mirror of
https://github.com/kevin-DL/revel-cmd.git
synced 2026-01-11 18:54:31 +00:00
Merge pull request #212 from revel/build_process_update
Updated verbose flag
This commit is contained in:
@@ -309,6 +309,14 @@ func (c *CommandConfig) initGoPaths() {
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Sets the versions on the command config.
|
||||||
|
func (c *CommandConfig) GetVerbose() (verbose bool) {
|
||||||
|
if len(c.Verbose) > 0 {
|
||||||
|
verbose = c.Verbose[0]
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Sets the versions on the command config.
|
// Sets the versions on the command config.
|
||||||
func (c *CommandConfig) SetVersions() (err error) {
|
func (c *CommandConfig) SetVersions() (err error) {
|
||||||
c.CommandVersion, _ = ParseVersion(cmd.Version)
|
c.CommandVersion, _ = ParseVersion(cmd.Version)
|
||||||
|
|||||||
@@ -133,7 +133,8 @@ func runApp(c *model.CommandConfig) (err error) {
|
|||||||
// If the app is run in "watched" mode, use the harness to run it.
|
// If the app is run in "watched" mode, use the harness to run it.
|
||||||
if revelPath.Config.BoolDefault("watch", true) && revelPath.Config.BoolDefault("watch.code", true) {
|
if revelPath.Config.BoolDefault("watch", true) && revelPath.Config.BoolDefault("watch.code", true) {
|
||||||
utils.Logger.Info("Running in watched mode.")
|
utils.Logger.Info("Running in watched mode.")
|
||||||
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v}`, revelPath.RunMode, c.Verbose[0])
|
|
||||||
|
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v}`, revelPath.RunMode, c.GetVerbose())
|
||||||
if c.HistoricMode {
|
if c.HistoricMode {
|
||||||
runMode = revelPath.RunMode
|
runMode = revelPath.RunMode
|
||||||
}
|
}
|
||||||
@@ -152,7 +153,7 @@ func runApp(c *model.CommandConfig) (err error) {
|
|||||||
if len(app.PackagePathMap) > 0 {
|
if len(app.PackagePathMap) > 0 {
|
||||||
paths, _ = json.Marshal(app.PackagePathMap)
|
paths, _ = json.Marshal(app.PackagePathMap)
|
||||||
}
|
}
|
||||||
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose[0], string(paths))
|
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.GetVerbose(), string(paths))
|
||||||
if c.HistoricMode {
|
if c.HistoricMode {
|
||||||
runMode = revelPath.RunMode
|
runMode = revelPath.RunMode
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ func testApp(c *model.CommandConfig) (err error) {
|
|||||||
if len(app.PackagePathMap) > 0 {
|
if len(app.PackagePathMap) > 0 {
|
||||||
paths, _ = json.Marshal(app.PackagePathMap)
|
paths, _ = json.Marshal(app.PackagePathMap)
|
||||||
}
|
}
|
||||||
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.Verbose[0], string(paths))
|
runMode := fmt.Sprintf(`{"mode":"%s", "specialUseFlag":%v,"packagePathMap":%s}`, app.Paths.RunMode, c.GetVerbose(), string(paths))
|
||||||
if c.HistoricMode {
|
if c.HistoricMode {
|
||||||
runMode = app.Paths.RunMode
|
runMode = app.Paths.RunMode
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user