Merge pull request #1187 from fibonacci1729/master

fix(#1185): get release status by version iff version > 0
pull/1188/head
Brian 8 years ago committed by GitHub
commit 13712d67d6

@ -187,11 +187,11 @@ func (s *releaseServer) GetReleaseStatus(c ctx.Context, req *services.GetRelease
if rel, err = s.env.Releases.Deployed(req.Name); err != nil { if rel, err = s.env.Releases.Deployed(req.Name); err != nil {
return nil, fmt.Errorf("getting deployed release '%s': %s", req.Name, err) return nil, fmt.Errorf("getting deployed release '%s': %s", req.Name, err)
} }
} } else {
if rel, err = s.env.Releases.Get(req.Name, req.Version); err != nil { if rel, err = s.env.Releases.Get(req.Name, req.Version); err != nil {
return nil, fmt.Errorf("getting release '%s' (v%d): %s", req.Name, req.Version, err) return nil, fmt.Errorf("getting release '%s' (v%d): %s", req.Name, req.Version, err)
} }
}
if rel.Info == nil { if rel.Info == nil {
return nil, errors.New("release info is missing") return nil, errors.New("release info is missing")

Loading…
Cancel
Save