diff --git a/dev/sg/live.go b/dev/sg/live.go index 51e762e68e5..ac9bf0c77d3 100644 --- a/dev/sg/live.go +++ b/dev/sg/live.go @@ -72,13 +72,22 @@ func printDeployedVersion(e environment, commits int) error { )) return nil } + // format: id_date_releasetag-sha elems := strings.Split(bodyStr, "_") if len(elems) != 3 { return errors.Errorf("unknown format of /__version response: %q", body) } buildDate := elems[1] - buildSha := elems[2] + + // attempt to split the release tag from the commit Sha if there + var buildSha string + versionTag := strings.Split(elems[2], "-") + if len(versionTag) != 2 { + buildSha = elems[2] + } else { + buildSha = versionTag[1] + } pending = std.Out.Pending(output.Line("", output.StylePending, "Running 'git fetch' to update list of commits...")) _, err = run.GitCmd("fetch", "-q")