// The Versions tab's first-glance strip separates what routes report serving // from channel targets. "Next" remains the legacy ladder's beta candidate // when it differs from stable; app-defined pipelines explain promotion in // their channel view instead. package console type ReleaseSummary struct { Deployment DeploymentStatus // NextVersion is beta's candidate when it differs from live; "" when // there is nothing next. NextVersion string } func assembleReleaseSummary(channels []ChannelView, routes []RouteView, acct string) ReleaseSummary { s := ReleaseSummary{Deployment: observedDeployment(routes, acct)} var beta ChannelView var stable ChannelView for _, ch := range channels { switch ch.Name { case "stable": stable = ch case "beta": beta = ch } } if stable.Err == "" && beta.Err == "" && beta.Version != "" && beta.Version != stable.Version { s.NextVersion = beta.Version } return s }