carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1// The Versions tab's first-glance strip separates what routes report serving
2// from channel targets. "Next" remains the legacy ladder's beta candidate
3// when it differs from stable; app-defined pipelines explain promotion in
4// their channel view instead.
5package console
6
7type ReleaseSummary struct {
8 Deployment DeploymentStatus
9 // NextVersion is beta's candidate when it differs from live; "" when
10 // there is nothing next.
11 NextVersion string
12}
13
14func assembleReleaseSummary(channels []ChannelView, routes []RouteView, acct string) ReleaseSummary {
15 s := ReleaseSummary{Deployment: observedDeployment(routes, acct)}
16 var beta ChannelView
17 var stable ChannelView
18 for _, ch := range channels {
19 switch ch.Name {
20 case "stable":
21 stable = ch
22 case "beta":
23 beta = ch
24 }
25 }
26 if stable.Err == "" && beta.Err == "" && beta.Version != "" && beta.Version != stable.Version {
27 s.NextVersion = beta.Version
28 }
29 return s
30}
31