func setAppType(app *definitions.Contracts, name, command, typ string) error { var t string log.WithFields(log.Fields{ "task": command, "type": typ, "app": name, }).Debug("Setting app type") if typ != "" { t = typ } else { switch command { case "test": t = app.TestType case "deploy": t = app.DeployType } } switch t { case "embark": app.AppType = definitions.EmbarkApp() case "sunit": app.AppType = definitions.SUnitApp() case "manual": app.AppType = definitions.GulpApp() default: app.AppType = definitions.EPMApp() } log.WithField("app type", app.AppType.Name).Debug() return nil }
func setAppType(app *definitions.Contracts, name, command, typ string) error { var t string logger.Debugf("Setting App Type. Task =>\t%s\n", command) logger.Debugf("\tChainType =>\t\t%s\n", typ) logger.Debugf("\tChainName =>\t\t%s\n", name) if typ != "" { t = typ } else { switch command { case "test": t = app.TestType case "deploy": t = app.DeployType } } switch t { case "embark": app.AppType = definitions.EmbarkApp() case "sunit": app.AppType = definitions.SUnitApp() case "manual": app.AppType = definitions.GulpApp() default: app.AppType = definitions.EPMApp() } logger.Debugf("\tApp Type =>\t\t%s\n", app.AppType.Name) return nil }