GetVersion implements localv1connect.LocalServiceHandler.
(ctx context.Context, r *connect.Request[localv1.GetVersionRequest])
| 116 | |
| 117 | // GetVersion implements localv1connect.LocalServiceHandler. |
| 118 | func (s *Server) GetVersion(ctx context.Context, r *connect.Request[localv1.GetVersionRequest]) (*connect.Response[localv1.GetVersionResponse], error) { |
| 119 | latestVersion, err := s.app.ch.LatestVersion(ctx) |
| 120 | if err != nil { |
| 121 | s.logger.Warn("error finding latest version", zap.Error(err)) |
| 122 | } |
| 123 | |
| 124 | return connect.NewResponse(&localv1.GetVersionResponse{ |
| 125 | Current: s.app.ch.Version.Number, |
| 126 | Latest: latestVersion, |
| 127 | }), nil |
| 128 | } |
| 129 | |
| 130 | // PushToGithub implements localv1connect.LocalServiceHandler. |
| 131 | // It assumes that the current project is not a git repo, it should generally be called after DeployValidation. |
nothing calls this directly
no test coverage detected