Skip to content

Commit

Permalink
print release version on dashboard
Browse files Browse the repository at this point in the history
  • Loading branch information
qrnvttrl committed Aug 13, 2024
1 parent 814b94c commit 4b289e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ func (d *dashboard) Render() {
apiVersion = "unknown"
apiHealth = "unknown"
apiHealthMessage string
releaseVersion = "unknown"

lastErr error
)
Expand All @@ -318,7 +319,7 @@ func (d *dashboard) Render() {
coloredHealth = apiHealth
}

versionLine := fmt.Sprintf("cloud-api %s (API Health: %s), cloudctl %s (%s)", apiVersion, coloredHealth, v.Version, v.GitSHA1)
versionLine := fmt.Sprintf("cloud-api %s (API Health: %s), cloudctl %s (%s), release %s", apiVersion, coloredHealth, v.Version, v.GitSHA1, releaseVersion)
fetchInfoLine := fmt.Sprintf("Last Update: %s", time.Now().Format("15:04:05"))
if lastErr != nil {
fetchInfoLine += fmt.Sprintf(", [Update Error: %s](fg:red)", lastErr)
Expand All @@ -338,6 +339,7 @@ func (d *dashboard) Render() {
return
}
apiVersion = *infoResp.Payload.Version
releaseVersion = infoResp.Payload.ReleaseVersion

healthResp, err := d.cloud.Health.Health(health.NewHealthParams().WithContext(ctx), nil)
if err != nil {
Expand Down

0 comments on commit 4b289e9

Please sign in to comment.