mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 15:12:02 +00:00
sg: fix live command after ci build version update (#48116)
This commit is contained in:
parent
544f0f1986
commit
707950e3d5
@ -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")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user